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

I think the search origin need to change as below when the focus moves outside of the spatial navigation container.
(NOTE: the condition of spatial navigation container = 
     the viewport of a browsing context (not limited to the top-level browsing context) ||
     scroll containers || element specified with `spatial-navigation-contain: contain`)
    
i) Previous search origin is a visible focusable element inside iframe
=> Search origin will change to the document of the iframe

ii) Previous search origin is a visible focusable element inside the spatial navigation container except for iframe
 => Search origin won't change
 => If you look at the figure below:
       
![image](https://user-images.githubusercontent.com/6636090/64580109-1d48c280-d3c0-11e9-988c-b5443c2d34a8.png)
The element with blue outline is the currently focused element and the search origin.
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.
However, if the search origin changes to the container before the focus moves out of the container, the focus will go to 'A' when you press the down arrow key, and I think it isn't reasonable behavior.

Also, I think the search origin should change only when the directional input used for spatial navigation, not scrolling.
(Current browser behavior: when there is a focused element **_A_** inside the scroller **_S_** and after scrolling **_S_** with arrow keys, the **_A_** is still the focused element.)

@hugoholgersson, what do you think?

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

Received on Tuesday, 10 September 2019 02:46:43 UTC