fix(android): reduce selection flicker - #2876
Conversation
|
| function setTouched() { | ||
| interactionGuard.markActive(); | ||
| if (touched) return; | ||
| touched = true; | ||
| interactionGuard.markActive(); | ||
| requestAnimationFrame(() => { | ||
| touched = false; | ||
| }); |
There was a problem hiding this comment.
Throttle Lacks Regression Coverage
The new animation-frame throttle has no regression coverage. Existing interaction-guard tests only exercise markActive() and suppress(), so they would still pass if this latch stopped resetting or allowed repeated same-frame updates. Add a test with a controlled requestAnimationFrame that proves a burst causes one update and another update is allowed after the frame; otherwise the selection-flicker fix can regress unnoticed.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Thanks for looking into this. I don’t think the proposed change has a clear connection to #2865.
The Could you please provide:
Without that validation, the black editor surface shown in #2865 appears more likely to be a WebView/compositor or selection-layer issue, so I don’t think this should be merged. |
Fixes #2865.
Reduces repeated interaction-guard updates during code selection by throttling setTouched() to one call per animation frame.