Skip to content

Starting point isn't changed when searching outside of a container #3358

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

Closed
frivoal opened this issue Dec 3, 2018 · 5 comments
Closed

Starting point isn't changed when searching outside of a container #3358

frivoal opened this issue Dec 3, 2018 · 5 comments

Comments

@frivoal
Copy link
Collaborator

frivoal commented Dec 3, 2018


Migrated from WICG/spatial-navigation#128
Originally created by @hugoholgersson on Thu, 01 Nov 2018 20:33:20 GMT


I created a Chromium-bug that describes this in problem in more detail: https://crbug.com/900499.

The current algorithm (pictured in 7.2) does not change the starting point* when climbing to an ancestor container.

* In Chrome we use the term "search origin" instead of "starting point".

@frivoal
Copy link
Collaborator Author

frivoal commented Dec 3, 2018


Migrated from WICG/spatial-navigation#128 (comment)
Originally created by @jihyerish on Thu, 08 Nov 2018 09:18:35 GMT


Oh, I see. Then I can see two topics here:

[Topic 1]
If the starting point inside the scroll container becomes out of the view, reset the starting point to the scroll container.
[Topic 2]
Use the bounding border box(visual bounding box) of the scroll container only when searching outside.

Topic 1 is also related to WICG/spatial-navigation#129.
I think we need to discuss more about it.

But for Topic 2, why do you think that the scope for searching the candidate is the visual bounding box only when the focus moving outside?
Does it mean that if the focus is about to move inside the scroll container and the scroll bar is at the end, the focus will move to the first element in the scroll container which is offscreen?

@frivoal
Copy link
Collaborator Author

frivoal commented Dec 3, 2018


Migrated from WICG/spatial-navigation#128 (comment)
Originally created by @hugoholgersson on Thu, 08 Nov 2018 10:11:47 GMT


But for Topic 2, why do you think that the scope for searching the candidate is the visual bounding box only when the focus moving outside?

Look at @junhoseo's test case. It demonstrates why we cannot use the scroll container's edge when searching outside of the [focused] scroll container.

Does it mean that if the focus is about to move inside the scroll container and the scroll bar is at the end, the focus will move to the first element in the scroll container which is offscreen?

Spatnav should never move focus to an offscreen element... When moving towards a scroll container, no matter if it contains visible focusables or not, focus should first go to the scroll container itself. (Remember that scroll containers are focusables too.)

@frivoal
Copy link
Collaborator Author

frivoal commented Dec 3, 2018


Migrated from WICG/spatial-navigation#128 (comment)
Originally created by @hugoholgersson on Tue, 06 Nov 2018 08:07:23 GMT


if the starting point which is a decendent of the scrollable element becomes out of the view, the starting point needs to be changed to the bounding border box of the scrollable element.

Yes, that's what I mean, but this is only when searching outside the scroll container.

@frivoal
Copy link
Collaborator Author

frivoal commented Dec 3, 2018


Migrated from WICG/spatial-navigation#128 (comment)
Originally created by @jihyerish on Tue, 06 Nov 2018 07:23:42 GMT


In current spec, the focus moves inside or outside of the scrollable element depending on the bounding border box of the scrollable element.
(The definition of the boundary box in the spec: https://wicg.github.io/spatial-navigation/#boundary-box)

I'm not sure I understand clearly about your point.
Am I understanding right about your opinion as below?:

  • if the starting point which is a decendent of the scrollable element becomes out of the view, the starting point needs to be changed to the bounding border box of the scrollable element.

@frivoal frivoal removed the topic:spec label Dec 3, 2018
@jihyerish
Copy link
Contributor

jihyerish commented Dec 4, 2018

The issue migration script created some duplicates. #3392 is the same as this one.
So I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants