Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4e347d6 authored by Keisuke Kuroyanagi's avatar Keisuke Kuroyanagi
Browse files

Reset drag accelerator state in Editor#sendOnTextChanged.

This fixes a crash that happened because mStartOffset
could point to an invalid offset after changing the text.

Bug: 21178876
Change-Id: I2fbb5ea3d6b8c5a97ca7248116b58ead673a8b0a
parent 4ba81a08
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1162,6 +1162,10 @@ public class Editor {
        // We do not hide the span controllers, since they can be added when a new text is
        // inserted into the text view (voice IME).
        hideCursorControllers();
        // Reset drag accelerator.
        if (mSelectionModifierCursorController != null) {
            mSelectionModifierCursorController.resetTouchOffsets();
        }
        stopTextActionMode();
    }