w3c / webdriver

Remote control interface that enables introspection and control of user agents.
https://w3c.github.io/webdriver/
Other
676 stars 190 forks source link

Scroll into view: scroll position `end` vs. `center` #1680

Open christian-bromann opened 1 year ago

christian-bromann commented 1 year ago

The spec currently says that before interacting with an element, it needs to be scrolled into view:

To scroll into view an element perform the following steps only if the element is not already in view:

Let options be the following ScrollIntoViewOptions:

Logical scroll position "block" "end" Logical scroll position "inline" "nearest"

I would like to propose to change the position block from end to center given that many applications have fixed positioned elements at the bottom the screen, e.g.

I'ld argue scrolling the element into the center of the viewpoint has higher chances that there are less elements that could be blocking the interaction causing element click intercepted errors.


Preview | Diff