RESOLVED FIXED 218533
Toggling pointer-events on body does not re-enable scrolling on child
https://bugs.webkit.org/show_bug.cgi?id=218533
Summary Toggling pointer-events on body does not re-enable scrolling on child
Liam DeBeasi
Reported 2020-11-03 13:37:29 PST
Created attachment 413103 [details] Code Reproduction Setting `pointer-events: none` on the body and then removing it does not re-enable scrolling on descendent scrollable elements. Steps to Reproduce: 1. Open attached code reproduction on an iPhone running iOS 14.0 or newer. 2. Verify that you can scroll the page. 3. Tap the "Tap to Disable Scrolling" button. Verify that you can no longer scroll the page. This adds `pointer-events: none` to the body. 4. After 3000ms `pointer-events: none` will be removed from the body. At this point, you should not be able to scroll, even though `pointer-events: none` has been removed. 5. Tap the "Tap me to fix scrolling" button. After doing this, you should be able to scroll again. Expected Behavior: After removing `pointer-events: none` from the body, I would expect to be able to scroll again. Actual Behavior: After removing `pointer-events: none` from the body, I am unable to scroll. Additional Information: * I had opened a similar issue for iOS 12.2, but that bug went away with iOS 13.0: https://bugs.webkit.org/show_bug.cgi?id=195801. * This was tested on an iPhone 11 running iOS 14.2, but I can reproduce it on iOS 14.0.1 and iOS 14.1 as well. * I cannot reproduce this on iOS 13.6. * I cannot reproduce this on Safari for macOS.
Attachments
Code Reproduction (3.52 KB, text/html)
2020-11-03 13:37 PST, Liam DeBeasi
no flags
Patch (2.94 KB, patch)
2020-11-19 03:37 PST, Devin Rousso
simon.fraser: review-
hi: commit-queue-
Patch (7.26 KB, patch)
2020-12-01 16:00 PST, Devin Rousso
no flags
Patch (8.38 KB, patch)
2020-12-14 16:46 PST, Devin Rousso
no flags
Radar WebKit Bug Importer
Comment 1 2020-11-03 13:48:46 PST
Simon Fraser (smfr)
Comment 2 2020-11-03 14:05:43 PST
Need to check to see if we correctly regenerate the event regions.
Devin Rousso
Comment 3 2020-11-19 03:37:22 PST
Created attachment 414561 [details] Patch I'd love to have a way to test this. Uploading to EWS to see if any existing tests have issues (and therefore might be able to be used to derive my own test).
Antoine Quint
Comment 4 2020-11-19 04:59:58 PST
Can you not write a test that scrolls and check whether scrolling occurred? You can take a look at LayoutTests/pointerevents tests which, although testing a different feature, will likely show examples of that.
Devin Rousso
Comment 5 2020-11-19 05:15:22 PST
(In reply to Antoine Quint from comment #4) > Can you not write a test that scrolls and check whether scrolling occurred? You can take a look at LayoutTests/pointerevents tests which, although testing a different feature, will likely show examples of that. Oh nice! I was going to ask someone about this tomorrow. Thanks! :) FYI I marked it as cq- because it did not have tests. I should've said "I don't know how to write a test for this." instead in comment #3.
Simon Fraser (smfr)
Comment 6 2020-11-19 09:42:35 PST
Comment on attachment 414561 [details] Patch Needs a test. See fast/scrolling/ios/body-overflow-hidden.html for an example of how to test scrolling
Devin Rousso
Comment 7 2020-12-01 16:00:06 PST
EWS
Comment 8 2020-12-01 19:36:00 PST
Committed r270339: <https://trac.webkit.org/changeset/270339> All reviewed patches have been landed. Closing bug and clearing flags on attachment 415173 [details].
Simon Fraser (smfr)
Comment 9 2020-12-02 08:29:16 PST
The test is failing in EWS
Truitt Savell
Comment 10 2020-12-02 10:42:05 PST
The new test fast/scrolling/ios/overflow-scroll-pointer-events.html is timing out on iOS constantly. History: https://results.webkit.org/?suite=layout-tests&test=fast%2Fscrolling%2Fios%2Foverflow-scroll-pointer-events.html
WebKit Commit Bot
Comment 11 2020-12-02 11:03:19 PST
Re-opened since this is blocked by bug 219441
Truitt Savell
Comment 12 2020-12-02 12:16:34 PST
Reverted r270339 for reason: introduced a constantly failing test. Committed r270363: <https://trac.webkit.org/changeset/270363>
Devin Rousso
Comment 13 2020-12-14 16:46:47 PST
Created attachment 416209 [details] Patch improved test to not fail :)
EWS
Comment 14 2020-12-15 10:01:23 PST
Committed r270849: <https://trac.webkit.org/changeset/270849> All reviewed patches have been landed. Closing bug and clearing flags on attachment 416209 [details].
Note You need to log in before you can comment on or make changes to this bug.