Summary: | Web Inspector: Styles: editing focus lost when inspector is blurred | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Devin Rousso <hi> | ||||||||
Component: | Web Inspector | Assignee: | Nikita Vasilyev <nvasilyev> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, hi, inspector-bugzilla-changes, nvasilyev, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Devin Rousso
2018-11-28 16:14:43 PST
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. |