You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Swiping fast onto a slider or an item with actions adjusts the previous reading control #449
If you move onto a slider, or an item with actions, and swipe up or down straight away, Backtalk changes the reading control you were on before (for example characters) instead of the slider's value or the item's actions. Swiping slowly works.
Steps to reproduce
Set the reading control to characters.
Open Settings > Sound & vibration.
Swipe right onto a volume slider and swipe up immediately after.
Actual behavior
The characters reading control is adjusted and the volume doesn't change.
Expected behavior
The slider is adjusted, the same as when you pause before swiping up. The same goes for items with actions, such as home screen app icons: a fast swipe up or down should move through the actions.
Cause
When focus lands on a slider or an item with actions, SelectorController.newItemFocused switches the reading control automatically, but while a touch is active it holds the switch back until touchInteractionState(false). Android reports the end of the touch about 300 ms after the finger lifts, while Backtalk acts on its own gestures right away. A fast second swipe therefore lands in the same touch interaction and acts on the old reading control. I confirmed the order with trace logs on an emulator: the adjust ran with GRANULARITY_CHARACTERS before the switch to the slider setting.
Fix
This is fixed on my branch t3/fix-slider-action-touch-lag (commit 8ad68685): adjustSelectedSetting and selectPreviousOrNext now apply the held-back switch before acting, so a fast swipe acts on the item you just reached. It includes a unit test that fails without the fix, and I checked sliders, app icon actions and changing the reading control on an emulator. I'll open a PR once I'm under my open PR limit.
🤖 Claude Opus 5.5 responding on behalf of nibarAhmed
The fix is verified on a Galaxy S26 Ultra: a fast swipe onto a slider or an item with actions now adjusts that item. Before I open the PR, one decision on how much of Google's SelectorController.java it should touch.
Proposed change
The fix applies the held-back switch at the start of the two gestures that read the reading control:
/** * Applies a focus change that is waiting for the touch to end. A gesture can arrive before the * touch ends, so it must act on the setting for the item that now has focus. */privatevoidapplyPendingFocusChange() {
if (lastFocusedNode != null) {
switchCurrentSetting(lastFocusedNode);
}
}
privatebooleanselectPreviousOrNext(...) {
applyPendingFocusChange();
...
}
publicvoidadjustSelectedSetting(EventIdeventId, booleanisNext) {
applyPendingFocusChange();
...
}
The regression test goes in WebReadingControlTest.kt, which is Backtalk's own file.
Decision needed
touchInteractionState already does the same thing inline when the touch ends:
if (!touchActive) {
if (lastFocusedNode != null) {
switchCurrentSetting(lastFocusedNode);
}
}
Leave Google's block untouched (recommended). The change to Google's file is about 10 added lines and no rewritten ones. The cost is that the three-line check exists twice.
Make that block call the helper. There's no duplication, but four of Google's existing lines are rewritten, which makes merges from upstream a bit more likely to conflict.
Both behave the same. My branch currently has option 2; I'll switch it to whichever you prefer before opening the PR.
Option 1, please: leave Google's block in touchInteractionState as it is and add the helper for the two gestures. Having the three-line check in two places is a fair price for keeping Google's lines unchanged. This is the bug I most want fixed, and I know you're at three open PRs, so I'll get #451 or #407 done first to free a slot.
Activity
nibarAhmed commentedon Nov 14, 2026
Note
🤖 Claude Opus 5.5 responding on behalf of nibarAhmed
The fix is verified on a Galaxy S26 Ultra: a fast swipe onto a slider or an item with actions now adjusts that item. Before I open the PR, one decision on how much of Google's
SelectorController.javait should touch.Proposed change
The fix applies the held-back switch at the start of the two gestures that read the reading control:
The regression test goes in
WebReadingControlTest.kt, which is Backtalk's own file.Decision needed
touchInteractionStatealready does the same thing inline when the touch ends:Both behave the same. My branch currently has option 2; I'll switch it to whichever you prefer before opening the PR.
trypsynth commentedon Nov 15, 2026
Option 1, please: leave Google's block in
touchInteractionStateas it is and add the helper for the two gestures. Having the three-line check in two places is a fair price for keeping Google's lines unchanged. This is the bug I most want fixed, and I know you're at three open PRs, so I'll get #451 or #407 done first to free a slot.