-
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
Define the block flow and inline base directions for dom-focus #9518
Labels
Comments
CC @emilio |
dlrobertson
added a commit
to dlrobertson/html
that referenced
this issue
Jul 17, 2023
Remove the implementation defined behavior in the definition of the block and inline arguments passed to scroll a target into view. Fixes: whatwg#9518
dlrobertson
added a commit
to dlrobertson/html
that referenced
this issue
Jul 17, 2023
Remove the implementation defined behavior in the definition of the block and inline arguments passed to scroll a target into view. Fixes: whatwg#9518
Merged
4 tasks
dlrobertson
added a commit
to dlrobertson/html
that referenced
this issue
Jul 18, 2023
Remove the implementation defined behavior in the definition of the block and inline arguments passed to scroll a target into view. Fixes: whatwg#9518
domenic
pushed a commit
that referenced
this issue
Jul 19, 2023
Previously, the inline position was implementation-defined, whereas the block position was centered. Now, they are both centered. Fixes #9518. Also updates to use CSSOM View's new "scroll a target into view" algorithm, which replaces the broken link to "scroll an element into view" that we were previously trying to invoke.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When Element.focus() is used, the element should be scrolled into view such that the element is in a defined position. Currently dom-focus states:
Added
focus/focus-centers-element.html
in web-platform-tests/wpt#41029 that essentially checks thatElement.focus()
behaves similar toElement.scrollIntoView({block: "center", inline: "center"})
.Element.focus() center in the block direction
Element.focus() center in the inline direction
Element.focus() center in both directions
Since browsers seem to agree that
Element.focus()
should center the element, it might make sense to specify this instead of leaving this implementation defined. Several web-platform tests assume thatElement.focus()
will cause an element to end in a certain scroll position (e.g.css/css-scroll-snap/scroll-target-margin-005.html
), but AFAIK this is essentially undefined behavior (at least from the specs point of view).The text was updated successfully, but these errors were encountered: