Skip to content

Commit

Permalink
Fix: Caret not blinking on iOS after dragging to scroll (Resolves #1549
Browse files Browse the repository at this point in the history
…) (#1557)
  • Loading branch information
matthew-carroll authored and web-flow committed Oct 24, 2023
1 parent 335443b commit a47a141
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,9 @@ class _IosDocumentTouchInteractorState extends State<IosDocumentTouchInteractor>
// Stop waiting for a long-press to start.
_globalTapDownOffset = null;
_tapDownLongPressTimer?.cancel();
_controlsController!.hideMagnifier();
_controlsController!
..hideMagnifier()
..blinkCaret();

if (_wasScrollingOnTapDown) {
// The scrollable was scrolling when the user touched down. We expect that the
Expand All @@ -589,8 +591,6 @@ class _IosDocumentTouchInteractorState extends State<IosDocumentTouchInteractor>
return;
}

_controlsController!.blinkCaret();

final selection = widget.selection.value;
if (selection != null &&
!selection.isCollapsed &&
Expand Down Expand Up @@ -986,7 +986,9 @@ class _IosDocumentTouchInteractorState extends State<IosDocumentTouchInteractor>

void _onPanEnd(DragEndDetails details) {
_magnifierOffset.value = null;
_controlsController!.hideMagnifier();
_controlsController!
..hideMagnifier()
..blinkCaret();

if (_dragMode == null) {
// User was dragging the scroll area. Go ballistic.
Expand Down Expand Up @@ -1021,7 +1023,6 @@ class _IosDocumentTouchInteractorState extends State<IosDocumentTouchInteractor>
_onHandleDragEnd();
}

_controlsController!.blinkCaret();
_handleAutoScrolling.stopAutoScrollHandleMonitoring();
scrollPosition.removeListener(_onAutoScrollChange);
}
Expand Down

0 comments on commit a47a141

Please sign in to comment.