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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user