Bug 119011 - Web Inspector: using cmd+tab to leave the inspector window forces "jump to definition" mode when it gains focus again
Summary: Web Inspector: using cmd+tab to leave the inspector window forces "jump to de...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-07-23 07:14 PDT by Antoine Quint
Modified: 2013-10-05 01:16 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2013-07-23 07:14:19 PDT
Steps to reproduce:

1. Open the inspector (docked or not, doesn't matter)
2. Open the styles panel
3. Cmd+tab to switch to another application
4. Cmd+tab to switch back to Safari

At this point, if you mouse over a CSS property name, it'll underline and a click will jump to where the property was defined. We're probably detecting the Cmd key being pressed from the Cmd+tab action as we lose focus since this only happens if you Cmd+tab away from the window.
Comment 1 Radar WebKit Bug Importer 2013-07-23 07:14:35 PDT
<rdar://problem/14521065>
Comment 2 Timothy Hatcher 2013-07-23 07:53:33 PDT
Great! We have had a user on Twitter reporting this be we could never find steps.
Comment 3 Antoine Quint 2013-10-02 07:19:54 PDT
This is due to WebInspector.modifierKeys.metaKey having the incorrect value in this scenario. I'm not sure how we can get updated information about the metaKey press state as the window regains focus.
Comment 4 Antoine Quint 2013-10-02 10:51:18 PDT
One way to do this would be to track key modifier states on mousemove events at the window level, as well as on keypress. I think that would give us the most comprehensive coverage. Additionally, I think we would do well to also track the mouse coordinates at all times in case they need to be queried. This could be useful for some of the CodeMirror-related features that we're implementing (such as http://webkit.org/b/119012) where we may need to get information about a token outside of a mouse event, for instance when the key modifier states change.
Comment 5 Antoine Quint 2013-10-03 08:27:45 PDT
The patch for review in http://webkit.org/b/119012 fixes this.
Comment 6 Antoine Quint 2013-10-05 01:16:34 PDT
Fixed with http://trac.webkit.org/changeset/156923.