Closed
Bug 1447196
Opened 7 years ago
Closed 7 years ago
Pointer Event preventDefault should not block scrollbar clicks
Categories
(Core :: DOM: Events, defect, P2)
Tracking
()
VERIFIED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox-esr52 | --- | unaffected |
firefox59 | --- | wontfix |
firefox60 | --- | verified |
firefox61 | --- | verified |
People
(Reporter: bob+bmo, Assigned: smaug)
References
Details
Attachments
(1 file, 6 obsolete files)
6.40 KB,
patch
|
RyanVM
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180310025718
Steps to reproduce:
Tested on a Windows 10 v1709 device with no touch input.
1. Open test case: https://codepen.io/Bob_Vul/pen/WzREVK (scrollable div with a handler on pointerdown that just preventDefault()s it)
2. Try to click on the scrollbar arrows or empty space to scroll.
Actual results:
Nothing happens when clicking on the scrollbar arrows or empty space.
Dragging the scroll handle still works.
Expected results:
Scrolling by clicking on the scrollbar should still work even with preventDefault() called on pointerdown.
Note that preventDefault() on mousedown does *not* block scrollbar clicks. Also, preventDefault() on pointerdown does not have this behaviour on Chrome 64 or Edge 41 (EdgeHTML 14), i.e. Firefox is the outlier here.
For an example of impact, this will affect anyone using Grids in the Ext JS framework, which consolidates all input event handlers under pointer events where available, and uses preventDefault to block clicks on the scrollbar from activating the underlying element while still allowing scrollbar usage.
It has already been reported to them by one other person: https://www.sencha.com/forum/showthread.php?469777-Firefox-59-0-1-Scroller-does-not-scroll-grid
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → bugs
Updated•7 years ago
|
Priority: -- → P2
Assignee | ||
Comment 2•7 years ago
|
||
Hmm, I haven't figured out the minimal testcase here yet, since if I export from codepen, the issue doesn't happen.
Assignee | ||
Comment 3•7 years ago
|
||
And even on codepen the issue happens only occasionally, at least on linux.
Assignee | ||
Comment 4•7 years ago
|
||
oh, I see, on linux it is just because the scrollbar is a tad different to windows. On Windows this is easier to notice.
Assignee | ||
Comment 5•7 years ago
|
||
remote: View your change here:
remote: https://hg.mozilla.org/try/rev/8ced7db1588a6dbe663502e84e559fbf4577665e
remote:
remote: Follow the progress of your build on Treeherder:
remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=8ced7db1588a6dbe663502e84e559fbf4577665e
remote: recorded changegroup in replication log in 0.092s
Assignee | ||
Comment 6•7 years ago
|
||
remote: View your change here:
remote: https://hg.mozilla.org/try/rev/9e10d65e38d2d64678bd0adf73e8f58fe81e4976
remote:
remote: Follow the progress of your build on Treeherder:
remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=9e10d65e38d2d64678bd0adf73e8f58fe81e4976
remote: recorded changegroup in replication log in 0.072s
Assignee | ||
Comment 7•7 years ago
|
||
we do need the default handling here, especially, we do need nsIFrame::HandleEvent.
But I think in general we want system group handling for mouse events, just
have the prevent default flag set.
hopefully this version of the test passes on all the desktop platforms.
(smooth scrolling was causing some trouble)
remote: View your change here:
remote: https://hg.mozilla.org/try/rev/208dccee47d8319069dd52ad6e054d226258de1f
remote:
remote: Follow the progress of your build on Treeherder:
remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=208dccee47d8319069dd52ad6e054d226258de1f
remote: recorded changegroup in replication log in 0.064s
Attachment #8961163 -
Attachment is obsolete: true
Attachment #8961176 -
Attachment is obsolete: true
Attachment #8961296 -
Flags: review?(masayuki)
Comment 8•7 years ago
|
||
Hmm, is the orange of dom/events/test/pointerevents/test_bug1303704.html a regression of your patch?
Comment 9•7 years ago
|
||
Comment on attachment 8961296 [details] [diff] [review]
pointerdown_preventdefault_with_test.diff
Review of attachment 8961296 [details] [diff] [review]:
-----------------------------------------------------------------
Hmm, but looks good to me. Please check the orange before landing.
::: dom/events/test/pointerevents/test_bug1303704.html
@@ +92,5 @@
> + var offsetX = rect.width - 4;
> + var offsetY = rect.height - 4
> + synthesizeMouse(scrollable, offsetX, offsetY,
> + { type: "mousedown",
> + inputSource: MouseEvent.MOZ_SOURCE_MOUSE });
nit: looks like odd indent.
@@ +96,5 @@
> + inputSource: MouseEvent.MOZ_SOURCE_MOUSE });
> +
> + synthesizeMouse(scrollable, offsetX, offsetY,
> + { type: "mousemove",
> + inputSource: MouseEvent.MOZ_SOURCE_MOUSE });
ditto.
@@ +100,5 @@
> + inputSource: MouseEvent.MOZ_SOURCE_MOUSE });
> +
> + synthesizeMouse(scrollable, offsetX, offsetY,
> + { type: "mouseup",
> + inputSource: MouseEvent.MOZ_SOURCE_MOUSE });
ditto.
Attachment #8961296 -
Flags: review?(masayuki) → review+
Assignee | ||
Comment 10•7 years ago
|
||
yes, because that is what I'm modifying, adding a new test there. I'm using tryserver as way to figure out how to make my changes pass on Mac and Windows
Assignee | ||
Comment 11•7 years ago
|
||
Ah, now I looked at this stuff on Mac. We don't show the scrollbar there by default, so the test can't work.
Assignee | ||
Comment 12•7 years ago
|
||
Disabling the test on Mac too. Handling of scrollable areas on mac is a bit weird.
Assignee | ||
Comment 13•7 years ago
|
||
Attachment #8961358 -
Attachment is obsolete: true
Comment 14•7 years ago
|
||
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/36c52265e4a1
canceling pointerdown should not affect to scrollbar handling, r=masayuki
Comment 15•7 years ago
|
||
Backed out for failing mochitest headless at dom/events/test/pointerevents/test_bug1303704.html
Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=36c52265e4a18cb02d01af022cc9238aed0c8a94
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=169660480&repo=mozilla-inbound&lineNumber=2792
Backout: https://hg.mozilla.org/integration/mozilla-inbound/rev/d1960bf6a6175852ba23e9544a8bdacfb32d19e7
Flags: needinfo?(bugs)
Assignee | ||
Comment 16•7 years ago
|
||
ok, then disabling on headless too, somehow...
Assignee | ||
Comment 17•7 years ago
|
||
And more try runs.
remote:
remote: Follow the progress of your build on Treeherder:
remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=6905c916ddc76f62e12a16153f8db18245524189
remote: recorded changegroup in replication log in 0.044s
Flags: needinfo?(bugs)
Comment 18•7 years ago
|
||
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b4f1e88f8b6e
canceling pointerdown should not affect to scrollbar handling, r=masayuki
Comment 19•7 years ago
|
||
Backed out changeset b4f1e88f8b6e (bug 1447196) for 2 failures in dom/events/test/pointerevents/test_bug1303704.html
Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=b4f1e88f8b6e7f15c37990722d7e8491a74b729f&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=runnable&filter-resultStatus=running&filter-resultStatus=pending&filter-resultStatus=success&filter-classifiedState=unclassified&selectedJob=169801642
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=169801642&repo=mozilla-inbound&lineNumber=4134
Backout: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=7ce6b5f442f03c0f6fc886a8543ef823061c745b&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=runnable&filter-resultStatus=running&filter-resultStatus=pending&filter-resultStatus=success
Flags: needinfo?(bugs)
Assignee | ||
Comment 21•7 years ago
|
||
it would be nice to be able to reproduce locally.
Anyhow, modifying the test a bit.
remote: Follow the progress of your build on Treeherder:
remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=df68ebf51d522c4638eee787421239999e661f0b
remote: recorded changegroup in replication log in 0.084s
Assignee | ||
Comment 22•7 years ago
|
||
remote: Follow the progress of your build on Treeherder:
remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=ce68e8430b7d59ef515d57d42631fc63dd4512bf
remote: recorded changegroup in replication log in 0.070s
Reporter | ||
Comment 23•7 years ago
|
||
(In reply to Olli Pettay [:smaug] (only webcomponents and event handling reviews, please) from comment #21)
> it would be nice to be able to reproduce locally.
If it helps, I can give you remote access to a Windows VM?
Assignee | ||
Comment 24•7 years ago
|
||
thanks, but looks like the latest version is quite stable on try.
Assignee | ||
Comment 25•7 years ago
|
||
Tryserver looks good, so retrying again.
Comment 26•7 years ago
|
||
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fe95ca481981
canceling pointerdown should not affect to scrollbar handling, r=masayuki
Comment 27•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Assignee | ||
Comment 28•7 years ago
|
||
Comment on attachment 8961712 [details] [diff] [review]
pointerdown_preventdefault_with_test_4.diff
Approval Request Comment
[Feature/Bug causing the regression]: bug 1411467
[User impact if declined]: some web sites may not work the expected way
[Is this code covered by automated tests?]: yes
[Has the fix been verified in Nightly?]: yes
[Needs manual test from QE? If yes, steps to reproduce]: see comment 0
[List of other uplifts needed for the feature/fix]: Just this patch
[Is the change risky?]: It is a tad risky since pointer events is a new addition and some parts of the spec are still shaky.
[Why is the change risky/not risky?]: see above
[String changes made/needed]: NA
Attachment #8961712 -
Flags: approval-mozilla-beta?
Updated•7 years ago
|
status-firefox59:
--- → wontfix
status-firefox60:
--- → affected
status-firefox-esr52:
--- → unaffected
Updated•7 years ago
|
Attachment #8961296 -
Attachment is obsolete: true
Updated•7 years ago
|
Attachment #8961359 -
Attachment is obsolete: true
Updated•7 years ago
|
Attachment #8961476 -
Attachment is obsolete: true
Comment 29•7 years ago
|
||
Comment on attachment 8961712 [details] [diff] [review]
pointerdown_preventdefault_with_test_4.diff
Simple webcompat fix which includes new automated test coverage. Approved for 60.0b9.
Attachment #8961712 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 30•7 years ago
|
||
bugherder uplift |
Flags: in-testsuite+
Updated•7 years ago
|
Flags: qe-verify+
QA Contact: alexandru.simonca
Reporter | ||
Comment 31•7 years ago
|
||
Thanks!
Tested working in 60.0b9/Win10 with both the simplified test case and the Ext JS Grid widget this was discovered in.
Comment 32•7 years ago
|
||
Hi,
Tested on 60.b13 and the latest 61.0a1 on Windows 10 x64, Ubuntu 14.04 LTS x64 and MacOS 10.13.5. The issue is VERIFIED FIXED.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Comment 33•7 years ago
|
||
Hello anybody still watching, it looks like changeset fe95ca481981946094bacf5191342b135c79f9e6 introduced bug #1463354. If you'd like to test that bug, it's pretty simple (if you have a touch-capable Windows PC) -- just go to Google Maps and try to do a two-finger zoom. Let me know if I can provide additional assistance.
You need to log in
before you can comment on or make changes to this bug.
Description
•