Bug 145589

Summary: Web Inspector: Uncaught exception starting a NavigationBar drag and mousing over a different NavigationBar
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: DoNotImportToRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix
timothy: review+, joepeck: commit-queue-
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2015-06-02 21:21:14 PDT
* SUMMARY
Uncaught exception starting a NavigationBar drag and mousing over a different NavigationBar

* STEPS TO REPRODUCE
1. Inspect a page
2. Show "Styles" > "Rules" sidebar for a dom element (two navigation bars right next to each other)
3. Click and hold "Rules"
4. Mouse over "Computed" (all is good)
5. Mouse over "Node" in the other navigation bar
  => Uncaught Exceptions

* EXCEPTION
[Error] TypeError: null is not an object (evaluating 'this.selectedNavigationItem.active = true')
  _mouseMoved
  (anonymous function)
Comment 1 Joseph Pecoraro 2015-06-02 21:23:23 PDT
Created attachment 254140 [details]
[PATCH] Proposed Fix
Comment 2 Timothy Hatcher 2015-06-02 22:03:11 PDT
Comment on attachment 254140 [details]
[PATCH] Proposed Fix

The mouse move on document was to allow tracking of the selected radio navigation item as you moved the mouse side to side. It might be best to just abort early in the mouse move listener. I'm not sure we use many of these radio items any more, only one I can think of is the Details sidebar / Styles sidebar panel. I assume those are the bars you saw this with?
Comment 3 Timothy Hatcher 2015-06-02 22:05:44 PDT
Yep, I see you said that in the description. So doing this will break the old behavior of dragging side to side then mouse up to select an item when the mouse drifts outside the bar. I think that is fine. I doubt anyone does that in practice, I was just mimicking Xcode there.
Comment 4 Joseph Pecoraro 2015-06-02 22:53:24 PDT
Ahh, I only made it (In reply to comment #3)
> Yep, I see you said that in the description. So doing this will break the
> old behavior of dragging side to side then mouse up to select an item when
> the mouse drifts outside the bar. I think that is fine. I doubt anyone does
> that in practice, I was just mimicking Xcode there.

Oops. I should be able to keep that working. I'll investigate a better fix.
Comment 5 Joseph Pecoraro 2015-06-02 23:07:00 PDT
(In reply to comment #4)
> Ahh, I only made it (In reply to comment #3)
> > Yep, I see you said that in the description. So doing this will break the
> > old behavior of dragging side to side then mouse up to select an item when
> > the mouse drifts outside the bar. I think that is fine. I doubt anyone does
> > that in practice, I was just mimicking Xcode there.
> 
> Oops. I should be able to keep that working. I'll investigate a better fix.

Ahah! This behavior was broken, which is why I didn't notice to preserve it!
Comment 6 Joseph Pecoraro 2015-06-02 23:07:16 PDT
Created attachment 254153 [details]
[PATCH] Proposed Fix
Comment 7 Timothy Hatcher 2015-06-03 07:09:32 PDT
Comment on attachment 254153 [details]
[PATCH] Proposed Fix

Great!
Comment 8 WebKit Commit Bot 2015-06-03 07:58:26 PDT
Comment on attachment 254153 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 254153

Committed r185151: <http://trac.webkit.org/changeset/185151>
Comment 9 WebKit Commit Bot 2015-06-03 07:58:30 PDT
All reviewed patches have been landed.  Closing bug.