Enable ability to prevent scrolling in Element.focus()
Fixed Issue #14314565
Steps to reproduce
There is a spec proposal to disable automatic scroll into view on Element.focus().
Here is the summary of current situation: https://github.com/whatwg/html/pull/2787#issuecomment-338193107
The new dictionary type “FocusOptions” with the “preventScroll" dictionary member is introduced.
The IDL of Element.focus() will change to:
dictionary FocusOptions {
boolean preventScroll = false;
};
void focus(optional FocusOptions options);
If preventScroll is omitted or false, then the element will be scrolled into view with UA-defined manners.
Otherwise, it disables scrolling triggered by focus().
Related tests:
https://github.com/w3c/web-platform-tests/pull/7915
https://github.com/w3c/web-platform-tests/pull/7917
You need to sign in to your Microsoft account to add a comment.
Sign in