Bug 147236 - Web Inspector: TimelineOverview scroll container eats mouse events due to its large z-index
Summary: Web Inspector: TimelineOverview scroll container eats mouse events due to its...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Matt Baker
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-07-23 13:33 PDT by Matt Baker
Modified: 2016-12-13 15:38 PST (History)
4 users (show)

See Also:


Attachments
[Patch] Proposed Fix (7.60 KB, patch)
2015-10-24 17:53 PDT, Matt Baker
bburg: review-
bburg: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Baker 2015-07-23 13:33:41 PDT
* SUMMARY
TimelineOverview scroll container eats mouse events due to its large z-index. The bottom 16px of the TimelineOverview cannot respond to mouse events to create ruler selections or click on graph records.

* NOTES
Scroll container needs to get first crack at scroll events, thus the high z-index. But we should look at forwarding other mouse events to underlying elements.
Comment 1 Matt Baker 2015-10-24 17:53:01 PDT
Created attachment 263992 [details]
[Patch] Proposed Fix
Comment 2 Radar WebKit Bug Importer 2015-10-24 17:53:19 PDT
<rdar://problem/23249409>
Comment 3 BJ Burg 2015-10-28 10:46:22 PDT
Comment on attachment 263992 [details]
[Patch] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=263992&action=review

r- because it doesn't fix the bug when I tested it. I can't make a selection by starting the drag where the scroll bar is positioned.

When I look at the DOM, removing the z-index on the scroll container allows me to make the selection but not interact with a visible scroll bar. Is it possible that we can pump up the z-index only when the scroll bar is visible and being hovered?

> Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js:435
> +            if (!(event.pageX >= graphRect.left && event.pageX <= graphRect.right && event.pageY >= graphRect.top && event.pageY <= graphRect.bottom))

Please use WebInspector.Rect.prototype.intersectionWithRect and friends.
Comment 4 Matt Baker 2015-10-28 13:24:13 PDT
(In reply to comment #3)
> Comment on attachment 263992 [details]
> [Patch] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=263992&action=review
> 
> r- because it doesn't fix the bug when I tested it. I can't make a selection
> by starting the drag where the scroll bar is positioned.

Yikes! I was just checking that I could click within the ruler to select frames, which wasn't previously possible either without a hack.

> When I look at the DOM, removing the z-index on the scroll container allows
> me to make the selection but not interact with a visible scroll bar. Is it
> possible that we can pump up the z-index only when the scroll bar is visible
> and being hovered?

I'll look into this.

> > Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js:435
> > +            if (!(event.pageX >= graphRect.left && event.pageX <= graphRect.right && event.pageY >= graphRect.top && event.pageY <= graphRect.bottom))
> 
> Please use WebInspector.Rect.prototype.intersectionWithRect and friends.

Will do.
Comment 5 Matt Baker 2015-10-28 13:24:54 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > Comment on attachment 263992 [details]
> > [Patch] Proposed Fix
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=263992&action=review
> > 
> > r- because it doesn't fix the bug when I tested it. I can't make a selection
> > by starting the drag where the scroll bar is positioned.
> 
> Yikes! I was just checking that I could click within the ruler to select
> frames, which wasn't previously possible either without a hack.

I meant click within the scrollbar.