Bug 19033 - Scrolling does not work when the mouse down is handled by a node
: Scrolling does not work when the mouse down is handled by a node
Status: UNCONFIRMED
: WebKit
Event Handling
: 528+ (Nightly build)
: PC Windows XP
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-05-13 11:19 PST by
Modified: 2013-08-27 15:52 PST (History)


Attachments
The patch containing the proposed fix for this issue. (1.86 KB, patch)
2008-05-13 14:27 PST, Ananta
no flags Review Patch | Details | Formatted Diff | Diff
The patch containing the proposed fix for this issue. (1.86 KB, patch)
2008-05-13 14:30 PST, Ananta
darin: review-
Review Patch | Details | Formatted Diff | Diff
Reduced test case (683 bytes, text/html)
2013-08-27 15:08 PST, Steven Wittens
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-05-13 11:19:20 PST
Launch Safari 3.1 and navigate to http://cn.msn.com
Wait for the page to load fully.
Now click on the vertical/horizontal scrollbars. 
Observe that the page does not scroll. It does scroll
with the mousewheel.

Debugged this and found that the mouse down event is handled by the 
node returned as a result of the hit test. The hit test does not have
a scrollbar associated with it. This causes the page to not scroll. 
The code should also check if there is a scrollbar under the mouse and
pass it off if yes. The webkit code already does this in the case when
the mouse down event is not handled.

Will submit a patch for this.
------- Comment #1 From 2008-05-13 14:27:36 PST -------
Created an attachment (id=21112) [details]
The patch containing the proposed fix for this issue.
------- Comment #2 From 2008-05-13 14:29:37 PST -------
(From update of attachment 21112 [details])
The patch has tabs in it. Will submit a new patch for review.
------- Comment #3 From 2008-05-13 14:30:06 PST -------
Created an attachment (id=21113) [details]
The patch containing the proposed fix for this issue.
------- Comment #4 From 2008-05-24 22:51:16 PST -------
(From update of attachment 21113 [details])
For this to get checked in, we'll need a test case demonstrating the problem, in the form of a regression test.

I can't tell from reading the patch alone if this is correct. The test case will both help me understand that there truly is a bug here, and also is required as part of our "all bug fixes must have a regression test" policy.

To simulate a mouse click, you can use the eventSender feature of the regression test engine. The test in fast/events/mousedown_in_scrollbar.html is an example of one that tests a mouse event in a scrollbar, and could be used as a starting point in making a test.
------- Comment #5 From 2008-11-11 16:23:27 PST -------
We still have this diff in our tree, and I'm not sure why.
http://www.corp.google.com/~dglazkov/merge/WebCore-page-EventHandler.cpp-before.html#difflib_chg_to58__1
------- Comment #6 From 2008-11-11 16:24:11 PST -------
My apologies.  This is the external URL:
http://build.chromium.org/merge/WebCore-page-EventHandler.cpp-before.html#difflib_chg_to106__2
------- Comment #7 From 2009-12-31 02:37:24 PST -------
jQuery UI Dialog is affected by this issue: http://dev.jqueryui.com/ticket/4671
------- Comment #8 From 2010-04-27 10:55:26 PST -------
I think the change looks ok (I am not a reviewer) since MouseEventWithHitTestResults does not set "scrollbar" when hit-testing a frame scrollbar, but only in-frame scrollbars (like scrollable <div>, <textarea>, etc).

(In reply to comment #3)
> Created an attachment (id=21113) [details] [details]
> The patch containing the proposed fix for this issue.

However I could not reproduce the problem on Safari (webkit - trunk) on Snow Leonard. Given PLATFORM "WIN XP", I think it is Windows specific. Could you confirm?
------- Comment #9 From 2013-08-21 09:03:18 PST -------
(In reply to comment #0)
> Launch Safari 3.1 and navigate to http://cn.msn.com
> Wait for the page to load fully.
> Now click on the vertical/horizontal scrollbars. 
> Observe that the page does not scroll. It does scroll
> with the mousewheel.

Safari seems to scroll the page ok now.

Please provide a (reduced) test case or a new URL that shows the bug  or it is not actionable.

> Debugged this and found that the mouse down event is handled by the 
> node returned as a result of the hit test. The hit test does not have
> a scrollbar associated with it. This causes the page to not scroll. 
> The code should also check if there is a scrollbar under the mouse and
> pass it off if yes. The webkit code already does this in the case when
> the mouse down event is not handled.
>
------- Comment #10 From 2013-08-27 15:08:57 PST -------
Created an attachment (id=209805) [details]
Reduced test case

This bug is occurring on http://acko.net/ anywhere at the top. Debugging confirms a document mousedown handler fires when clicking the scrollbar. Emptying out the entire DOM does not fix this.

This is on Mac OS X, both with and without permanent scrollbars enabled. When using temporary scrollbars, you can also click the Gear button in the top right through the scrollbar.

I've attached a reduced test case. Note:

1) The scrollbar is unusable with the mouse
2) The grey div punches through the scrollbar for hit testing

Bug appears on Safari 6.0.5, Chrome 29, Chrome 31.