Closed Bug 1864148 Opened 2 years ago Closed 7 months ago

Unable to scroll product's carousel if swiping over a video that plays on aliexpress.com

Categories

(Core :: DOM: Events, defect, P2)

Other
Android
defect

Tracking

()

RESOLVED FIXED
145 Branch
Webcompat Priority P2
Webcompat Score 6
Tracking Status
firefox145 --- fixed

People

(Reporter: ctanase, Assigned: sefeng211)

References

()

Details

(Keywords: webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat:sightline], [wptsync upstream])

User Story

platform:android
impact:feature-broken
affects:all
configuration:general
branch:release
diagnosis-team:dom
user-impact-score:450

Attachments

(3 files)

Attached video scroll alie.mp4

Environment:
Operating system: OnePlus 6 A6000 (Android 11)
Firefox version: Nightly 121.0a1-20231107214948

Steps to reproduce:

  1. Go to any product that has videos in the carousel on aliexpress.com
  2. Play the video.
  3. Try scrolling the corousel by swiping over the video.

Expected Behaviour:
The carousel can be scrolled.

Actual Behaviour:
The carousel cannot be scrolled while swiping over a video that plays.

Notes:

  1. Screen rec provided
  2. Reproducible on Firefox Release as well
  3. Not reproducible on Chrome
  4. Issue found during WebCompat team [Top100] websites testing

Verified this issue and still reproduces on Firefox 123 and 125.

Tested with:

Browser / Version: Firefox Release 122.1.0 (2016001831-🦎122.0.1-20240205133611🦎)/ Firefox Nightly 125.0a1 (2016004775-🦎125.0a1-20240220212334🦎)/ Firefox Beta 123.0b9 (2016002567-🦎123.0-20240209102425🦎)/ Chrome Mobile Version 121.0.6167.164
Operating System: Google Pixel 3 (Android 12) -1080 x 2160 pixels, 18:9 ratio (~443 ppi density)
Operating System: Oppo Find X5 (Android 13) - 1080 x 2400 pixels, 20:9 ratio (~402 ppi density)

Severity: -- → S3
User Story: (updated)
Priority: P3 → P2
Component: Mobile → Site Reports

It looks like touch events get swallowed by the video event as long as video controls are present (controls attribute is set on <video>) in Firefox. It doesn't happen in Chrome, and the site is relying on that. Not sure which behaviour is correct.

Hi Sean, wonder if you have any thoughts on this? I've attached a testcase above.

User Story: (updated)
Flags: needinfo?(sefeng)

Thanks Ksenia, that example is really helpful. Looks like we stops the event bubbling at https://searchfox.org/mozilla-central/rev/faa7b1b2a7b509df04a8bafbf8520fc162ad1363/dom/html/HTMLMediaElement.cpp#4859-4863, so that the parent element (which is the slider this case) can't receive those events.

I checked bug 1327097 which introduced this change. So the motivation was to trap those events within the media elements to make them handled solely by controls. However, it looks like we don't check whether the controls are visible or not.

I wonder if we should only apply these logic when the controls are visible to the user. Olli, what do you think?

Flags: needinfo?(sefeng) → needinfo?(smaug)

There is !this->Controls() check. But if that doesn't catch some case when controls aren't visible, then sure, we should add some extra check.

Flags: needinfo?(smaug)

Thanks.

/me working this bug now

Assignee: nobody → sefeng

Bug 1327097 introduced the original change to trap all these events
because we only wanted the controls to handle them. However, this
should only happen when controls is visible.

This patch allows those event still propagates when controlBar
is transparent.

Whiteboard: [webcompat:sightline]
Webcompat Priority: --- → P2
Webcompat Score: --- → 6

Sean, what's next for this patch land?

Flags: needinfo?(sefeng)
Component: Site Reports → DOM: Events
Product: Web Compatibility → Core
Version: Firefox 121 → unspecified

er I can't remember why I put it aside, I'll start finishing off the patch.

Flags: needinfo?(sefeng)

Hi Sean! Do you still plan to drive this cross the completion line? I talked with Masayuki, who is willing to try helping out, if you'd like assistance from others. :)

Flags: needinfo?(sean)

Sure! though I'll be a bit slow :)

Attachment #9432623 - Attachment description: Bug 1864148 - Make HTMLMediaElement stop trapping pointer/touch/mouse events when controlBar is transparent → WIP: Bug 1864148 - Make HTMLMediaElement only trap touch events when the ControlBar or the PlayButton is the target
Attachment #9432623 - Attachment description: WIP: Bug 1864148 - Make HTMLMediaElement only trap touch events when the ControlBar or the PlayButton is the target → Bug 1864148 - Make HTMLMediaElement only trap touch events when the ControlBar or the PlayButton is the target
Attachment #9432623 - Attachment description: Bug 1864148 - Make HTMLMediaElement only trap touch events when the ControlBar or the PlayButton is the target → Bug 1864148 - Make HTMLMediaElement only trap touch events when the ControlBar or the PlayButton or the ClickToPlay button is the target
User Story: (updated)
Pushed by sean@seanfeng.dev: https://github.com/mozilla-firefox/firefox/commit/72e21c991048 https://hg.mozilla.org/integration/autoland/rev/919f1584d566 Make HTMLMediaElement only trap touch events when the ControlBar or the PlayButton or the ClickToPlay button is the target r=emilio,dom-core,smaug
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/55015 for changes under testing/web-platform/tests
Whiteboard: [webcompat:sightline] → [webcompat:sightline], [wptsync upstream]
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 145 Branch
Upstream PR merged by moz-wptsync-bot
User Story: (updated)
Flags: needinfo?(sean)
QA Whiteboard: [qa-triage-done-c146/b145]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: