Closed Bug 1857130 Opened 1 year ago Closed 11 months ago

Add a WPT which checks that overscroll-behavior is respected on the <html> element

Categories

(Core :: Panning and Zooming, task, P2)

task

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: botond, Assigned: emilio)

References

(Regressed 2 open bugs)

Details

Attachments

(1 file)

Chrome has a bug where it does not respect overscroll-behavior on the <html> element, only on the <body>.

To improve interop in this area, I would like to suggest adding a web platform test which checks for respecting overscroll-behavior on <html> specifically.

I think a way such a test could be formulated is to have an <iframe> with overscroll-behavior: contain on its <html> element, and check that scroll chaining from the iframe's contents to the enclosing document is successfully prevented.

For now I created two manual testcases:

The STR for both is:

  1. Scroll the page down to bring the iframe into view
  2. Try to scroll the iframe upwards, and see if scroll chaining to scroll the enclosing page upwards works

Tested on Safari on macos.

Scrolling the iframe up does NOT scroll the page in overscroll-behavior-contain-iframe-html.html

Scrolling the iframe up does scroll the page in overscroll-behavior-contain-iframe-body.html

I was able to test on Safari an iOS device.

For both testcases, scrolling up the iframe overscrolled the iframe and did not scroll the page.

(In reply to Timothy Nikkel (:tnikkel) from comment #3)

For both testcases, scrolling up the iframe overscrolled the iframe and did not scroll the page.

Huh, that's an interesting discrepancy betweeen macOS and iOS (or perhaps touchpad scrolling vs. touch scrolling).

I'd be curious to know whether the following two pages (which are just the same pages that are contained inside iframes in the previous test cases) allow pull-to-refresh in Safari on iOS:

I proposed improving interop in this area for Interop 2024: https://github.com/web-platform-tests/interop/issues/560

We discussed the proposal in today's Interop 2024 triage meeting, and it was suggested that, to improve the chances of the proposal being accepted by other browser vendors, we should try to contribute these WPTs as soon as possible.

Emilio kindly offered to try turning the manual testcases from comment 1 into WPTs (needinfoing as requested).

Note that due to bug 1797215, Firefox will likely not pass these WPTs yet (but that's fine, getting them to pass can be part of the work we do during the Interop 2024 process).

Flags: needinfo?(emilio)

We have this existing WPT for overscroll-behavior, the new tests could be adaptations of this one where instead of a scrollable <div> we have a scrollable subdocument.

Assignee: nobody → emilio
Status: NEW → ASSIGNED

Does comment 7 look reasonable? Fails on Chrome here as expected.

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5db6f03a7c10
Add a test for overscroll-behavior working on root. r=botond
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/42886 for changes under testing/web-platform/tests
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/autoland/rev/8e02ea14e423
Add missing test metadata to use the compositor code-path for overscroll-behavior.
Upstream PR was closed without merging
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/baf3d517ae40
Add a test for overscroll-behavior working on root. r=botond
Flags: needinfo?(emilio)
Regressions: 1862496
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
Regressions: 1862592
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: