* SUMMARY Hitting ESC while editing element tag name leaves element in bad state. * STEPS TO REPRODUCE 1. Open Elements tab 2. Double-click the tag text for an element, such as a <div> (must not be a self-closing tag) 3. Enter a new element name, hit ESC to cancel => The opening tag name reverts to the original text, but the closing tag does not
<rdar://problem/22821316>
Created attachment 261828 [details] [PATCH] Proposed Fix
Comment on attachment 261828 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=261828&action=review > Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js:809 > + let originalClosingTagTextContent = closingTagElement ? closingTagElement.textContent : ""; const originalClosingTagTextContent = ...
Comment on attachment 261828 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=261828&action=review >> Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js:809 >> + let originalClosingTagTextContent = closingTagElement ? closingTagElement.textContent : ""; > > const originalClosingTagTextContent = ... Though true, we do this a lot and we haven't exactly standardized on this. I tend to use const when assigning a literal primitive to give it a better name. const betterNameForBool = true; const minimumSizeOfSomething = 15; const defaultDisplayString = "–"; Maybe we should start using const more for cases like this.
Comment on attachment 261828 [details] [PATCH] Proposed Fix Clearing flags on attachment: 261828 Committed r190286: <http://trac.webkit.org/changeset/190286>
All reviewed patches have been landed. Closing bug.