WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
85312
Web Inspector: cmd-[ shortcut navigates page and is fr-keyboard incompatible
https://bugs.webkit.org/show_bug.cgi?id=85312
Summary
Web Inspector: cmd-[ shortcut navigates page and is fr-keyboard incompatible
Paul Irish
Reported
2012-05-01 14:34:42 PDT
Two independent, but related, issues: 1) cmd-[ on mac will navigate the parent page in addition to changing the inspector panel. All page state is lost as the page is navigated. 2) On a french keyboard, to type a ], you use `alt+gr + )`. Typed in the console, this trigger the inspector to go to the Elements panel. Interestingly [ causes no problems. This makes it impossible to type an array literal in the console.
Attachments
Patch
(5.09 KB, patch)
2012-05-25 04:09 PDT
,
Alexander Pavlov (apavlov)
vsevik
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alexander Pavlov (apavlov)
Comment 1
2012-05-21 08:40:14 PDT
***
Bug 86955
has been marked as a duplicate of this bug. ***
Alexander Pavlov (apavlov)
Comment 2
2012-05-21 09:10:43 PDT
(In reply to
comment #0
)
> Two independent, but related, issues: > > 1) cmd-[ on mac will navigate the parent page in addition to changing the inspector panel. All page state is lost as the page is navigated.
I'm unable to reproduce this one on a recent build (May 11).
> 2) On a french keyboard, to type a ], you use `alt+gr + )`. Typed in the console, this trigger the inspector to go to the Elements panel. Interestingly [ causes no problems. This makes it impossible to type an array literal in the console.
Assuming this one conveys the contents of
bug 86955
, will submit a patch for this one shortly.
Alexander Pavlov (apavlov)
Comment 3
2012-05-21 10:06:45 PDT
Darin, I vaguely remember you hack on the keyboard event handling in Chromium. Do you have a clue if the following behavior is correct or not? Chromium produces exactly the same Event data for "Ctrl"+"Alt"+"[" on the English QUERTY keyboard and for "AltGr"+")" (to enter the "]" character) on the French AZERTY keyboard (yes, in the latter case the event flags are: altGraphKey: false altKey: true ctrlKey: true keyCode: 219 keyIdentifier: "U+00DB" metaKey: false shiftKey: false ). Or should we monitor the modifier key states manually...
Paul Irish
Comment 4
2012-05-21 21:34:32 PDT
(In reply to
comment #2
)
> > 1) cmd-[ on mac will navigate the parent page in addition to changing the inspector panel. All page state is lost as the page is navigated. > > I'm unable to reproduce this one on a recent build (May 11).
I can repro in Canary and a recent WebKit nightly. Steps: 1) on this page, click to
bug 86955
2) cmd-opt-i to open inspector (mine currently opens to Scripts) 3) cmd-[ Results: Inspector moves to Network while parent page navigates back to this ticket
Alexander Pavlov (apavlov)
Comment 5
2012-05-24 08:08:32 PDT
(In reply to
comment #4
)
> (In reply to
comment #2
) > > > 1) cmd-[ on mac will navigate the parent page in addition to changing the inspector panel. All page state is lost as the page is navigated. > > > > I'm unable to reproduce this one on a recent build (May 11). > > > I can repro in Canary and a recent WebKit nightly. > > Steps: > > 1) on this page, click to
bug 86955
> 2) cmd-opt-i to open inspector (mine currently opens to Scripts) > 3) cmd-[ > > Results: > > Inspector moves to Network while parent page navigates back to this ticket
OK, I get the point. This works as intended, since on Mac, Cmd-[ is a standard Chrome shortcut to navigate back to the previous page (and Cmd-] navigates forward in the history). This works the same way as Alt-Left/Right on Win and Linux.
Alexander Pavlov (apavlov)
Comment 6
2012-05-24 08:50:00 PDT
(In reply to
comment #5
)
> OK, I get the point. This works as intended, since on Mac, Cmd-[ is a standard Chrome shortcut to navigate back to the previous page (and Cmd-] navigates forward in the history). This works the same way as Alt-Left/Right on Win and Linux.
Oops, we seem to intercept this shortcut, but not quite...
Alexander Pavlov (apavlov)
Comment 7
2012-05-25 04:09:35 PDT
Created
attachment 144040
[details]
Patch
Vsevolod Vlasov
Comment 8
2012-05-25 05:20:39 PDT
Comment on
attachment 144040
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=144040&action=review
> Source/WebCore/inspector/front-end/InspectorView.js:46 > + this._filteredKeyIdentifiers = ["U+005B", "U+00DB", "U+005D", "U+00DD"].keySet();
Let's create this._leftBracketKeyIdentifiers and this._rightBracketKeyIdentifiers fields and use them here and in _keyDownInternal to avoid duplicating this confusing unicode magic.
> Source/WebCore/inspector/front-end/InspectorView.js:95 > + if (event.charCode === 91 || event.charCode === 93) {
Please add a comment saying this is checking for brackets or use some function to convert character to ascii code.
> Source/WebCore/inspector/front-end/InspectorView.js:103 > + if (!WebInspector.isWin() || !this._filteredKeyIdentifiers.hasOwnProperty(event.keyIdentifier)) {
Please add a comment explaining this workaround (and reasoning) here.
Alexander Pavlov (apavlov)
Comment 9
2012-05-25 06:11:14 PDT
Committed
r118520
: <
http://trac.webkit.org/changeset/118520
>
Paul Irish
Comment 10
2012-08-02 08:11:24 PDT
***
Bug 84092
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug