Bug 189907 - Make Element.scrollIntoView properly work with nested scroll boxes and smooth behavior
Summary: Make Element.scrollIntoView properly work with nested scroll boxes and smooth...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: https://drafts.csswg.org/cssom-view/#...
Keywords: InRadar
Depends on: 188043
Blocks:
  Show dependency treegraph
 
Reported: 2018-09-23 21:40 PDT by Frédéric Wang (:fredw)
Modified: 2022-08-03 15:29 PDT (History)
9 users (show)

See Also:


Attachments
Testcase (1.72 KB, text/html)
2021-12-15 16:46 PST, Simon Fraser (smfr)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Wang (:fredw) 2018-09-23 21:40:30 PDT
Follow-up of bug 188043. This might need a bit more work so I'm moving that part out of the main bug.

Basically, the patch in bug 188043 naively follows https://drafts.csswg.org/cssom-view/#scroll-an-element-into-view but does not wait for smooth scroll of step 12 to complete, possibly resulting in wrong final positions. It's not clear we actually want to align on the current spec anyway, Gecko and Chromium use different algorithm. For details, see https://github.com/w3c/csswg-drafts/issues/3127

The WPT test for this is http://w3c-test.org/css/cssom-view/scroll-behavior-scrollintoview-nested.html
Comment 1 Radar WebKit Bug Importer 2021-08-24 16:12:30 PDT
<rdar://problem/82314968>
Comment 2 Simon Fraser (smfr) 2021-12-15 16:46:38 PST
Created attachment 447299 [details]
Testcase

Seems to work OK looking at the attached testcase
Comment 3 Rob Buis 2021-12-16 07:40:13 PST
Possibly I fixed this, anyway maybe Fred can double-check.
Comment 4 Ahmad Saleem 2022-07-28 14:47:34 PDT
Safari pass WPT test for following - https://wpt.fyi/results/css/cssom-view/scroll-behavior-scrollintoview-nested.html?label=master&label=experimental&aligned&q=scroll-behavior

Is it needed now or this can be marked as "RESOLVED CONFIGURATION CHANGED"? Thanks!
Comment 5 Ahmad Saleem 2022-08-03 15:29:40 PDT
Further, Safari also matches in behavior with all other browsers. I am going to mark this as "RESOLVED CONFIGURATION CHANGED", please reopen if this is not fixed. Thanks!