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

> If you press the down arrow key to move the focus out of the container, it looks natural when the focus moves to 'B' . And this is the case that the search origin doesn't change.

Makes sense, yes! 

> @hugoholgersson, what do you think?

- When activeElement is **not completely scrolled out** (it's still [partially] visible in its scrollport S):
  - Always search from activeElement's visible part.

- When activeElement is **completely scrolled out** from its scrollport S:
  1. First search in S from S's [edge](https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/page/spatial_navigation.cc?l=678&gsn=OppositeEdge).
  2. If nothing was found or S couldn't scroll further: search from S's box.

(This is [what I first suggested](https://crbug.com/900499) but I've added the condition for when activeElement is still visible, like the node with blue outline in your picture above.)

When activeElement is not scrolled out (it's still [partially] visible in its scrollport S) then, of course, we should keep the visible part of activeElement as search origin. I've added one if-statement to https://bit.ly/snav2 so you see this rule in the bigger picture.

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

Received on Friday, 13 September 2019 08:33:42 UTC