New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 900499 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Use scrollers' visible box as search origin when searching outside of them

Reported by hu...@vewd.com, Oct 31

Issue description

When searching outside a scroller that contains focus, we should use that scroller's visible box as search origin (not one of its edges).

Actual: Today, when focus F is clipped (being offscreen) inside a scroller A, spatnav uses an edge of A as its search origin when searching outside of it. Using an edge of A when searching outside of A can cause incorrect distance calculations, as we saw in  Issue 891149 .

Expected: Use A's visible box as search origin when searching outside of it. (It's only when searching inside of A that we should start at one of A's edges.)

To summarize:

  (I) Use a "box edge" of A when searching *inside* of a scroller A.
  (II) Use the "visual bounding box" of A when searching *outside* of a scroller A. 

This bug is related to  Issue 891149 .  Issue 891149  corrected the search origin when A itself is focused but not when A contains a clipped and focused element.

We found this problem when discussing https://chromium-review.googlesource.com/c/chromium/src/+/1253523.
 
Hugo, I have a question.

> When searching outside a scroller that contains focus
Do you mean that in case2, this rule is applied for elements inside A, or A only?


(II) would only be applied when searching outside of A, that is, when looking at candidates that are outside the scroller A. From a DOM tree perspective, this means candidates that don't descend A.


Sign in to add a comment