Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Caret not blinking on iOS after dragging to scroll (Resolves #1549) #1557

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading