Skip to content

Add scrollIntoView action#1964

Draft
hbenl wants to merge 1 commit into
w3c:masterfrom
hbenl:scrollintoview
Draft

Add scrollIntoView action#1964
hbenl wants to merge 1 commit into
w3c:masterfrom
hbenl:scrollintoview

Conversation

@hbenl
Copy link
Copy Markdown

@hbenl hbenl commented May 27, 2026

This PR adds scrollIntoView to the general actions.
The action should also be able to scroll text nodes (which can be passed in from WebDriver BiDi) and elements with display: contents into view. To this end, the "scroll into view" steps are updated to create a Range object for such nodes and call the "Scroll target into view" steps in the CSSOM View spec (which support Ranges) directly.
Note that this is a breaking change for interaction commands that implicitly scroll an element into view: previously, the implicit attempt to scroll an element with display: contents into view would do nothing but now it will be scrolled into view.

Fixes #1005.


This change is Reviewable


Preview | Diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing "scroll into view" Actions primitive

1 participant