Enable ability to prevent scrolling in Element.focus()

Confirmed Issue #14314565 • Assigned to Travis L.

Details

Author
Jihye H.
Created
Oct 20, 2017
Privacy
This issue is public.
Reports
Reported by 1 person

Sign in to watch or report this issue.

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

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Steven K.”

      Changed Assigned To to “travil”

      Changed Assigned To from “travil” to “Travis L.”

      Changed Status to “Confirmed”

    • The spec proposal related to this issue was finally merged to the HTML Spec.
      See the spec in here:
      https://html.spec.whatwg.org/#focus-management-apis

    You need to sign in to your Microsoft account to add a comment.

    Sign in