Closed Bug 1574223 Opened 5 years ago Closed 5 years ago

Consider treating document level ontouchmove as passive

Categories

(Core :: DOM: Events, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla70
Webcompat Priority ?
Tracking Status
firefox70 --- fixed

People

(Reporter: ksenia, Assigned: smaug)

References

()

Details

(Keywords: site-compat)

Attachments

(2 files)

Attached file 35163.html

On this page https://www.corsair.com/us/en/Categories/Products/Cases/Mid-Tower-ATX-Cases/Obsidian-Series%E2%84%A2-550D-Mid-Tower-Quiet-Case/p/CC-9011015-WW

the site is using:

      document.ontouchmove = function (e) {
        e.preventDefault();
      }

which breaks scrolling in Firefox on Android. Looks like Chrome threats ontouchmove here as passive, so preventDefault doesn't work.

Should we consider doing that as well?

(looks like it was implemented for touchstart and touchmove here https://bugzilla.mozilla.org/show_bug.cgi?id=1449268)

Attached a reduced test case as well

Webcompat Priority: --- → ?
Keywords: site-compat

touchmove should be considered passive by default.
https://searchfox.org/mozilla-central/source/dom/events/EventListenerManager.cpp#662-663,667-668

Hmm, I wonder if APZ is doing something unexpected here.

And on Windows with touchscreen panning works just fine.

ah, I think I see where the issue is.

Assignee: nobody → bugs
Summary: Consider threatening document level ontouchmove as passive → Consider treating document level ontouchmove as passive
Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e5549942df83 make touchstart/move passive by default also when using event handlers, not only event listeners, r=masayuki
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: