Re: [csswg-drafts] Starting point isn't changed when searching outside of a container (#3358)

---

Migrated from https://github.com/WICG/spatial-navigation/issues/128#issuecomment-436942513
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](https://chromium-review.googlesource.com/c/chromium/src/+/1253523/8/third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-search-outside-of-focused-scroller.html). 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](http://bit.ly/snav2) itself. (Remember that [scroll containers are focusables too](https://groups.google.com/a/chromium.org/d/msg/blink-dev/Fku6784p0wI/3MyOMTk7BwAJ).)

-- 
GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3358#issuecomment-443616369 using your GitHub account

Received on Monday, 3 December 2018 07:42:10 UTC