Skip to content

Commit c197ba5

Browse files
Material Design Teamdrchen
authored andcommitted
[Slider] Fix TalkBack focus bounds not updating after keyboard navigation
PiperOrigin-RevId: 876214372
1 parent 65e43a0 commit c197ba5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/java/com/google/android/material/slider/BaseSlider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3887,6 +3887,8 @@ private void dispatchOnChangedFromUser(int idx) {
38873887
}
38883888
if (accessibilityManager != null && accessibilityManager.isEnabled()) {
38893889
scheduleAccessibilityEventSender(idx);
3890+
// Invalidate to make sure TalkBack focus bounds are updated
3891+
accessibilityHelper.invalidateVirtualView(idx);
38903892
}
38913893
}
38923894

@@ -4374,7 +4376,6 @@ protected boolean onPerformActionForVirtualView(
43744376
if (slider.snapThumbToValue(virtualViewId, value)) {
43754377
slider.updateHaloHotspot();
43764378
slider.postInvalidate();
4377-
invalidateVirtualView(virtualViewId);
43784379
return true;
43794380
}
43804381
return false;
@@ -4403,7 +4404,6 @@ protected boolean onPerformActionForVirtualView(
44034404
slider.scheduleTooltipTimeout();
44044405
slider.updateHaloHotspot();
44054406
slider.postInvalidate();
4406-
invalidateVirtualView(virtualViewId);
44074407
return true;
44084408
}
44094409
return false;

0 commit comments

Comments
 (0)