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.
<rdar://problem/14521065>
Great! We have had a user on Twitter reporting this be we could never find steps.
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.
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.
The patch for review in http://webkit.org/b/119012 fixes this.
Fixed with http://trac.webkit.org/changeset/156923.