Enable ability to prevent scrolling in Element.focus()

Fixed Issue #14314565

Details

Author
Jihye H.
Created
Oct 20, 2017
Privacy
This issue is public.
Fixed in build #
17.17084
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

    • Microsoft Edge Team

      Changed Assigned To from “Travis L.” to “Nishant S.”

      Changed Status from “Confirmed” to “Fixed”

    • Hi, is this feature implementation completed?
      Can I think this is shipped in Edge?

    • Hello,

      Thank you for providing this information about the issue. We are pleased to report this feature is fixed in Edge and available in Insider Preview build 17046.

      Best Wishes,
      The MS Edge Team

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

    Sign in