* STEPS TO REPRODUCE: 1. inspect any page 2. show the Elements tab 3. start editing the name of any CSS property 4. switch WebKit/Safari tabs 5. go back to the original WebKit/Safari tab => editing ability lost (border styling is no longer present and the text is still selected, but no longer editable)
<rdar://problem/46800966>
Created attachment 357981 [details] Patch After a couple of weeks trying something complex, I discovered a simple and elegant solution!
Created attachment 357984 [details] [Video] With patch applied
Comment on attachment 357981 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=357981&action=review r=me, awesome! > Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js:217 > + if (!document.hasFocus()) I think a "safer" approach may be to check that the active element is still this element, meaning that we did a blur without moving the focus (e.g. the entire window lost focus) if (document.activeElement === this._element)
Comment on attachment 357981 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=357981&action=review >> Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js:217 >> + if (!document.hasFocus()) > > I think a "safer" approach may be to check that the active element is still this element, meaning that we did a blur without moving the focus (e.g. the entire window lost focus) > > if (document.activeElement === this._element) Ooh, I like it!
Created attachment 357990 [details] Patch
Comment on attachment 357990 [details] Patch Clearing flags on attachment: 357990 Committed r239527: <https://trac.webkit.org/changeset/239527>
All reviewed patches have been landed. Closing bug.