-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update dom-focus to specify the inline and block arguments to scroll a target into view #9527
Conversation
The "scroll an element into view definition" to "scroll a target into view"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thanks! We can count on this having multi-implementer interest since it just specifies what people are already doing.
set to an <span>implementation-defined</span> value.</p></li> | ||
<var>options</var> is false, then <span data-x="scroll a target into view">scroll the element | ||
into view</span> with <var>behavior</var> set to "auto", <var>block</var> set to "center", and | ||
<var>inline</var> set to "center".</p></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you're here you could update this to modern style, which would be given "auto", "center", and "center"
. (Since the algorithm is not declared with named parameters.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 good point
Remove the implementation defined behavior in the definition of the block and inline arguments passed to scroll a target into view. Fixes: whatwg#9518
Thanks for the feedback! Updated to use positional parameters |
…element., a=testonly Automatic update from web-platform-tests Test that element.focus() centers the element Follows whatwg/html#9527. -- wpt-commits: 58c50ca94c3cdfd1932352df691ee632fed20145 wpt-pr: 41029
…element., a=testonly Automatic update from web-platform-tests Test that element.focus() centers the element Follows whatwg/html#9527. -- wpt-commits: 58c50ca94c3cdfd1932352df691ee632fed20145 wpt-pr: 41029 UltraBlame original commit: ebcfbf73b81b0a8f2ebba07509f092700c9c690b
…element., a=testonly Automatic update from web-platform-tests Test that element.focus() centers the element Follows whatwg/html#9527. -- wpt-commits: 58c50ca94c3cdfd1932352df691ee632fed20145 wpt-pr: 41029 UltraBlame original commit: ebcfbf73b81b0a8f2ebba07509f092700c9c690b
…element., a=testonly Automatic update from web-platform-tests Test that element.focus() centers the element Follows whatwg/html#9527. -- wpt-commits: 58c50ca94c3cdfd1932352df691ee632fed20145 wpt-pr: 41029 UltraBlame original commit: ebcfbf73b81b0a8f2ebba07509f092700c9c690b
…element., a=testonly Automatic update from web-platform-tests Test that element.focus() centers the element Follows whatwg/html#9527. -- wpt-commits: 58c50ca94c3cdfd1932352df691ee632fed20145 wpt-pr: 41029
Summary
inline
andblock
(after bug 1842679). Update the definition of dom-focus to explicitly specify this. In addition, some web-platform-tests are written in a way that expectsElement.focus()
to focus an element to a certain scroll position.#scroll-an-element-into-view
to scroll-a-target-into-view.Checklist
FIxes: #9518
/browsing-the-web.html ( diff )
/canvas.html ( diff )
/infrastructure.html ( diff )
/interaction.html ( diff )