Overscroll transform on YouTube.com Notifications dropdown gets stuck + broken hit testing
Categories
(Core :: Panning and Zooming, defect, P2)
Tracking
()
People
(Reporter: gregp, Assigned: hiro)
References
Details
Attachments
(4 files, 1 obsolete file)
Steps to reproduce:
- Navigate to about:config
- Set
apz.overscroll.enabled
to true - Navigate to https://www.youtube.com/
- Login
- Click the bell icon in the top right on the page
- Scroll down then scroll back up
- Before the overscroll transform disappears, scroll down again
Actual results:
Overscroll transform gets stuck and hit testing becomes weird
Expected results:
Overscroll transform does not get stuck
Assignee | ||
Comment 2•2 years ago
|
||
Hey Greg, thanks for reporting. Is this issue a recent regression? Or it's been a while? If it's regression, then finding the culprit would be very helpful. Thanks!
Reporter | ||
Comment 3•2 years ago
•
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #2)
Hey Greg, thanks for reporting. Is this issue a recent regression? Or it's been a while? If it's regression, then finding the culprit would be very helpful. Thanks!
I've noticed this since I manually enabled overscroll a few months ago. I will see if it's a regression!
Edit: It's not a regression, I can reproduce as far back as 90.
Reporter | ||
Comment 4•2 years ago
|
||
Reporter | ||
Comment 5•2 years ago
|
||
Assignee | ||
Comment 6•2 years ago
|
||
I can reproduce the issue with the reduced test case in comment 5 on Windows. This would be a candidate of blockers of bug 1393102.
Assignee | ||
Comment 7•2 years ago
•
|
||
I do see the stuck gutter on Mac as well with using this test case. A STR provided by Greg;
1. Scroll down a fair bit on the nested scroll container
2. Scroll back up
3. Before the overscroll gutter disappears, start a new gesture by scrolling down again
You will see the yellow gutter.
Assignee | ||
Comment 8•2 years ago
|
||
Forgot adding bug 1393102 into blocker list. I will investigate this once after I finished bug 1794070.
Assignee | ||
Comment 9•2 years ago
|
||
A relevant part is here in PanGestureBlockState::SetConfirmedTargetApzc;
RefPtr<AsyncPanZoomController> scrollableApzc =
apzc->BuildOverscrollHandoffChain()->FindFirstScrollable(
*aFirstInput, &mAllowedScrollDirections);
The aFirstInput
is the pan-start event in the second pan gesture, which means it's upward direction at the 2) step in comment 7. So the FindFirstScrollable
returns the root content APZC. Normally if the scroll position of the child scroll container is at the top edge, returning the parent (the root) APZC is correct, but in this specific case, the child scroll container is overscrolled, thus FindFirstScrollable
needs to return the child one rather than the parent.
Assignee | ||
Comment 10•2 years ago
|
||
I somehow missed the test cases have a wheel event listener with preventDefault() on the root scroller. So I was about downgrading this priority since it's rarely used, but realized this issue happens on YouTube, a popular site. Anyway, comment 9 is not the right place to fix this issue I think.
Assignee | ||
Comment 11•2 years ago
|
||
The comment 10 was wrong. I am sorry for confusion. I did diagnosed the problem correctly in comment 9. I need to understand why we need to call FindFirstScrollable again when PanGestureBlockState::SetConfirmedTargetApzc gets called.
Assignee | ||
Comment 12•2 years ago
|
||
I checked Safari hands off the new gesture at 3 to the root scroll container as well as Firefox does currently but Safari restores the sub scroll container's overscroll state gracefully with a smooth animation while the root scroll container is being overscrolled. I will try to do the same thing on Firefox.
Assignee | ||
Comment 13•2 years ago
|
||
Reporter | ||
Comment 14•2 years ago
•
|
||
Comment 15•2 years ago
|
||
Comment 16•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Assignee | ||
Comment 17•2 years ago
|
||
Gregory, are you still able to see the original Youtube issue? The change merged into mozilla-central is much safer than the original change you tested in comment 14. I'd hope it fixes the original issue. Thanks!
Reporter | ||
Comment 18•2 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #17)
Gregory, are you still able to see the original Youtube issue?
Yes, I can still reproduce the bug using the steps in comment 0 on Firefox Nightly 111.0a1(20230117161302).
Assignee | ||
Comment 19•2 years ago
|
||
Gregory, can you please file a new bug for the remaining case? I found a new edge case (bug 1810935) but it's Linux specific.
Assignee | ||
Comment 21•2 years ago
|
||
Thanks!
Updated•2 years ago
|
Comment 22•2 years ago
|
||
Reproduced the issue with Firefox 108.0a1 (2022-10-22) using the steps from the description on Windows 10.
The issue is verified fixed with Firefox 112.0a1 (20230226214053) and Firefox 111.0b6 (20230226190100) on Windows 10 and macOS 12.
Description
•