RESOLVED FIXED 39237
Web Inspector: keyboard shortcut screen does not disappear on Esc.
https://bugs.webkit.org/show_bug.cgi?id=39237
Summary Web Inspector: keyboard shortcut screen does not disappear on Esc.
Pavel Feldman
Reported 2010-05-17 14:31:43 PDT
- Open inspector in docked mode - Press ? to show the screen - Undock inspector - Press Esc Actual: console is being opened. (Observed on Chromium ToT).
Attachments
patch: maintain focus on help screen while it's shown (2.48 KB, patch)
2010-05-18 08:23 PDT, Andrey Kosyakov
no flags
Andrey Kosyakov
Comment 1 2010-05-18 08:23:55 PDT
Created attachment 56377 [details] patch: maintain focus on help screen while it's shown This is obviously because we loose focus. I fixed it, but there are some caveats: - It doesn't work vice-versa (when transitioning for undocked to docked state), as entire inspector window gets out of focus. One would need to click it to get it focused again. This should probably be fixed in the browsers. - Text edit fields commit edited changes upon loosing focus. I hesitated whether we should disable our help when inspector is in editing mode, but then realized we only use shortcuts that would cause browser help to be opened, so we'll loose editor focus and commit changes anyway.
Timothy Hatcher
Comment 2 2010-05-18 08:28:27 PDT
Comment on attachment 56377 [details] patch: maintain focus on help screen while it's shown WebCore/inspector/front-end/HelpScreen.js:44 + this.contentElement.addEventListener("blur", this._onBlur.bind(this), false); You should register this in show and _hide so there isn't always a listener, even if help is never used. WebCore/inspector/front-end/HelpScreen.js:87 + if (this._isShown) Then you wouldn't need to check this, since you know it was visible or your wouldn't have been called. Otherwise r+.
Andrey Kosyakov
Comment 3 2010-05-18 08:46:33 PDT
(In reply to comment #2) > (From update of attachment 56377 [details]) > WebCore/inspector/front-end/HelpScreen.js:44 > + this.contentElement.addEventListener("blur", this._onBlur.bind(this), false); > You should register this in show and _hide so there isn't always a listener, even if help is never used. HelpScreen is created lazily, so if help is never used, to HelpScreen() is never called in the first place, and there won't be a listener. If help has been used, having a listener on the event that's not fired is probably cheaper than removing it?
WebKit Commit Bot
Comment 4 2010-05-19 21:37:15 PDT
Comment on attachment 56377 [details] patch: maintain focus on help screen while it's shown Clearing flags on attachment: 56377 Committed r59816: <http://trac.webkit.org/changeset/59816>
WebKit Commit Bot
Comment 5 2010-05-19 21:37:20 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.