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

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

Fix: Insertion handle can be moved just by tapping.

Horizontal poistion is passed to updatePosition() without
adding getHorizontalOffset(). The position is wrong for the
insertion handle; thus, the handle is moved just by tapping
on it.

Bug: 20923263
Change-Id: Ie867ebd9e6b682057b73373fefb7b2baf45caef9
parent aee0c2ce
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3687,7 +3687,8 @@ public class Editor {
                    }
                    mTouchToWindowOffsetY = newVerticalOffset + mLastParentY;

                    final float newPosX = rawX - mTouchToWindowOffsetX + mHotspotX;
                    final float newPosX =
                            rawX - mTouchToWindowOffsetX + mHotspotX + getHorizontalOffset();
                    final float newPosY = rawY - mTouchToWindowOffsetY + mTouchOffsetY;

                    updatePosition(newPosX, newPosY);