Update dom-focus to specify the inline and block arguments to scroll a target into view#9527
Merged
Conversation
The "scroll an element into view definition" to "scroll a target into view"
domenic
approved these changes
Jul 18, 2023
domenic
left a comment
Member
There was a problem hiding this comment.
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> |
Member
There was a problem hiding this comment.
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.)
Remove the implementation defined behavior in the definition of the block and inline arguments passed to scroll a target into view. Fixes: whatwg#9518
Member
Author
|
Thanks for the feedback! Updated to use positional parameters |
domenic
pushed a commit
to web-platform-tests/wpt
that referenced
this pull request
Jul 19, 2023
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
Jul 22, 2023
…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
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified-and-comments-removed
that referenced
this pull request
Jul 24, 2023
…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
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-comments-removed
that referenced
this pull request
Jul 24, 2023
…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
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified
that referenced
this pull request
Jul 24, 2023
…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
jwidar
pushed a commit
to jwidar/LatencyZeroGithub
that referenced
this pull request
Sep 16, 2025
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
inlineandblock(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-viewto scroll-a-target-into-view.Checklist
FIxes: #9518
/browsing-the-web.html ( diff )
/canvas.html ( diff )
/infrastructure.html ( diff )
/interaction.html ( diff )