Skip to content

Conversation

@ShaanNarendran
Copy link
Contributor

@ShaanNarendran ShaanNarendran commented Jan 20, 2026

Purpose / Description

ANR when the scrollbar was dragged or tapped in larger collections, arose due to the addition of pr #19980

Fixes

Approach

I deleted the previous delta based logic implemented and let the new function handle dragging and tapping which doesn't cause ANRs, for extra optimisation added a scrolltopositionwithoffset.

How Has This Been Tested?

Tested the scrolling with a deck of 100k cards and found no issue on rapid scrolling for 30 seconds along with taps throughout the browser

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@ShaanNarendran ShaanNarendran force-pushed the Scrollbar-Fix-2 branch 2 times, most recently from 1532f08 to 38247e7 Compare January 20, 2026 15:16
@david-allison
Copy link
Member

the new function

Please clarify this


In general, if you can list 'reverted X', then name the commit which is in HEAD, as this makes it easier to understand what was reverted, and what was fixed forward

I believe the commit is: ca95728

@david-allison david-allison added the Needs Author Reply Waiting for a reply from the original author label Jan 20, 2026
@ShaanNarendran
Copy link
Contributor Author

the new function

Please clarify this

Ah, by new function I meant the overriding of onTouchEvent which I had done for the main issue of tap and drag, should've phrased it better oops. Will edit the commit message now.

@ShaanNarendran
Copy link
Contributor Author

ShaanNarendran commented Jan 20, 2026

In general, if you can list 'reverted X', then name the commit which is in HEAD, as this makes it easier to understand what was reverted, and what was fixed forward

I believe the commit is: ca95728

Would I not have to mention 3c0b2bb since I removed the onTouchListener introduced in that commit, wouldn't it be better to write 'Reverts the onTouchListener introduced in 3c0b2bb'? I could be confusing the meaning of revert here so I just wanted to clarify.
Edit: 'Reverts ca95728' also seems right since introducing that pr is what caused the issue, so I suppose that's more appropriate like you said.

Fixes issue 20173.
Reverted the issue introduced in ca95728 by removing the conflicting onTouchListener added in 3c0b2bb.
@ShaanNarendran
Copy link
Contributor Author

Not sure if the new commit description works, but it made sense like this in my head

@Haz3-jolt Haz3-jolt removed the Needs Author Reply Waiting for a reply from the original author label Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The scrollbar can cause lag

3 participants