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
This commit is contained in:
Keisuke Kuroyanagi
2015-05-18 14:49:29 +09:00
parent aee0c2ce39
commit bc89a5ce34

View File

@@ -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);