Snav: Define search origin as the first visible focus-container
Scenario for bug: 1. The focused element F is inside a scrollable area A. 2. F is offscreen (=clipped) but A is (partly) visible. Problem: Spatnav started to search from the document's edge, not from A's edge. Solution: Set the "search origin" to one of A's outer edges. To solve this problem we redefine the "search origin" of spatial navigation. The search origin is either activeElement itself, if it's being at least partially visible, or its first [partially] visible scroller. If both F and its enclosing scroller A are completely offscreen, we recurse to the scroller’s scroller up until the root frame's document. The root document is a good base case because it's, per definition, a visible scrollable area. This builds onto the idea of: https://chromium-review.googlesource.com/c/chromium/src/+/873645 Bug: 804669 Change-Id: I15b0f41426d7632fe9ec62d77a414d592e3631c0 Reviewed-on: https://chromium-review.googlesource.com/883533 Commit-Queue: Hugo Holgersson <hugoh@vewd.com> Reviewed-by:Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#589502}
Showing
This diff is collapsed.
Please register or sign in to comment