Closed Bug 2033271 Opened 6 months ago Closed 5 months ago

Visual and interactional offset issue in vertical tabs ui

Categories

(Core :: Layout: Scrolling and Overflow, defect, P3)

Firefox 149
defect

Tracking

()

RESOLVED FIXED
153 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- wontfix
firefox150 --- wontfix
firefox151 --- wontfix
firefox152 --- wontfix
firefox153 --- fixed

People

(Reporter: npt1237, Assigned: hiro)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files, 1 external file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:149.0) Gecko/20100101 Firefox/149.0

Steps to reproduce:

Rapidly scrolling up or down in vertical tabs often creates an unintended blank space (margin) at the top or bottom of the tab list.

The exact trigger is inconsistent. While it happens most often during fast scrolling, it sometimes occurs during slow scrolls as well. The frequency is unpredictable—sometimes occurring every time, and other times once in five attempts.

Actual results:

When this gap appears, the mouse cursor's focus becomes misaligned with the actual tab selection point by the height of that gap.

Scrolling back toward the gap usually forces it to disappear, which also restores the correct alignment between the cursor and the selection point.

Expected results:

The gap should not be appeared.

Group: firefox-core-security

The Bugbug bot thinks this bug should belong to the 'Firefox::Tabbed Browser' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Tabbed Browser

This smells like a layout issue, not a frontend issue. Frontend code is not manipulating space above/below the actual scrollable elements unless dragging tabs, and the cursor being misaligned with where interaction happens I think would not be possible to achieve from frontend code alone (at least, not without trying to do it deliberatey, which we're obviously not).

Your screenshots show pinned tabs. Does this only reproduce in the situation where you have pinned tabs?

How are you scrolling - with a mouse scroll wheel, by dragging scrollbars, clicking in the scrollbar gutter, using the keyboard, or some other way? Can you describe what you do differently between what you call "fast scrolling" and "slow scrolling"?

Component: Tabbed Browser → Layout: Scrolling and Overflow
Flags: needinfo?(npt1237)
Product: Firefox → Core

Pinning or grouping tabs did not affect whether this issue occurred.

From what I observed, this issue only happens when scrolling with a touchpad. It does not occur when using the mouse wheel, dragging the scrollbar, or using keyboard shortcuts.

As for the difference between fast and slow scrolling: fast scrolling means moving your finger quickly on the touchpad so that the tab strip scrolls fully to the opposite direction in a short time. Slow scrolling means letting the built-in scrolling acceleration carry the movement to the opposite end after initiating the scroll on the touchpad.

If I keep my finger on the touchpad and continue the input until reaching the opposite end, no blank space appears at the edge.

Also, the more tabs are open, the longer the scrollable area, the wider the blank space becomes, and the more frequently it occurs.

Flags: needinfo?(npt1237)

*Slow scrolling means letting the scrolling acceleration itself carry the movement to the opposite end.

From my intuition, it seems that the inertial scrolling input from the touchpad is not being handled properly by the sidebar layout. When I scroll while keeping my finger on the touchpad, it appears that the scroll position is consistently constrained by the upper and lower bounds. However, this inertial “gliding” input does not seem to be treated as part of that same input stream.

The severity field is not set for this bug.
:hiro, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(hikezoe.birchill)

Hey npt1237, would you mind trying to set "apz.overscroll.enabled" to false, then see if this bug still persists?

I am guessing the gap is generated due to overscrolling , but now I tried to see it locally, but I don't see any overscrolling in the tab scroll container for some reasons.

Flags: needinfo?(hikezoe.birchill) → needinfo?(npt1237)
See Also: → 1970536
Flags: needinfo?(npt1237)

It occurs regardless of "appz.overscroll.enabled".

npt1237, would you mind trying this build ? (you can directly download from this link) I hope this build fixes this issue. Thanks!

Flags: needinfo?(npt1237)
Flags: needinfo?(npt1237)

I think the problem is solved.

Thanks.

Now I am ~90% sure this is a regression caused by bug 1871760. Since bug 1871760, we haven't clamped the visual scroll offset updated in ApplyRelativeScrollUpdateFrom because basically it has been clamped on the main-thread. But if there is a discrepancty between APZ and the main-thread, it will result out-of-bounds scroll offsets.

A patch is coming.

Keywords: regression
Regressed by: 1871760

When APZ is mid-animation and the main thread fires an instant scrollBy that
overshoots the top or left boundary, ApplyRelativeScrollUpdateFrom can produce
a negative visual scroll offset. Setting needToReclampScroll after the relative
update triggers the existing post-loop clamping on both Metrics() and all
sampled states, preventing the negative offset. As a side effect the bottom and
right boundaries are also clamped consistently.

Assignee: nobody → hikezoe.birchill
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

And I guess the scroll container stuck issue on youtube (bug 1931090) is also the same symptom here.

See Also: → 1931090

Set release status flags based on info from the regressing bug 1871760

Severity: -- → S3
Priority: -- → P3

Set release status flags based on info from the regressing bug 1871760

Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch

The patch landed in nightly and beta is affected.
:hiro, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(hikezoe.birchill)
Flags: needinfo?(hikezoe.birchill)
QA Whiteboard: [qa-triage-done-c154/b153]
Duplicate of this bug: 2048135
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: