Closed Bug 1043154 Opened 5 years ago Closed 5 years ago
Split console does not open on ESC if the focus is inside of source editor (style editor / debugger)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0 (Beta/Release) Build ID: 20140723030202 Steps to reproduce: 1. Open any website or a blank page 2. open the developer tools 3. Go to Style-Editor tab 4. Focus inside the right panel (which can contain the source of any of the files) 5. Hit ESC Actual results: The webconsole toolbox does not opens Expected results: webconsole toolbox should open even if the focus is inside the right-side sources panel
Status: UNCONFIRMED → NEW
Component: Developer Tools: Style Editor → Developer Tools: Source Editor
Ever confirmed: true
Summary: Webconsole toolbox does not opens up on ESC if the focus is inside right-side panel of the style-editor tab in devtools → Split console does not open on ESC if the focus is inside of source editor (style editor / debugger)
Hi Brian, I am willing to work on this bug. Can you give some pointers on this. Thanks, Jayesh
(In reply to Jayesh from comment #2) > Hi Brian, > > I am willing to work on this bug. Can you give some pointers on this. > > Thanks, > Jayesh OK, so the trick is adding a handler for extraKeys for the editor component that is being used by the style editor and the debugger. This is sending a CodeMirror keyMap object: http://codemirror.net/doc/manual.html#keymaps. I think this will actually be quite simple, just set the handler to the "Esc" key to false, which will tell CodeMirror to allow the event to be handled by the browser. extraKeys["Esc"] = false; The two places this will need to be done are: Style Editor at _getKeyBindings: http://dxr.mozilla.org/mozilla-central/source/browser/devtools/styleeditor/StyleSheetEditor.jsm#618 Debugger at initializeEditor: http://dxr.mozilla.org/mozilla-central/source/browser/devtools/debugger/debugger-view.js#211
Assignee: nobody → jayesh.choudhari17
Status: NEW → ASSIGNED
OS: Windows 7 → All
Hardware: x86_64 → All
Version: 34 Branch → Trunk
Hi Brian, I submitted a patch. Do have a look and update me on the changes. P.S.: Working on fx-team repository Thanks, Jayesh
Comment on attachment 8469048 [details] [diff] [review] escKey-1.patch Review of attachment 8469048 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, the extraKeys["Esc"] = false is already tested by CM. I'm going to open a follow up for properly restoring focus when the split console is closed, since this affects other things already - like if you have a text box focused, then ESC to open split console, then ESC to close split console then the text box should be refocused. https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=eb2f80122044
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
Verified: [bugday-20140813] Explanation: Web console is properly opening when users press ESC character in Style editor.
Already verified by Karthikeyan in comment 8.
You need to log in before you can comment on or make changes to this bug.