Cursor Control: Don't move cursor for GestureScrollEnd
It looks like when WebView and other Views are scrollable together, such as the Gmail composition activity, the GestureScrollEnd event coordinates will jump a lot from the last GestureScrollUpdate event. If we move the cursor in this case, the cursor will jump few lines above the current position. This is because the GestureScrollEnd event is generated from the Android MotionEvent::Action::CANCEL event, this is a event to notify the current View that the following events won't be dispatched to it anymore and the coordinates is in a different coordinate system. In this case, from WebView's point of view, the scroll sequence will be terminated if the touch event is going vertically, because the Android motion event won't be dispatched to WebView in this type of layout, so we won't be able to move the cursor up and down and user has to fallback to the regular way to move the cursor. Bug: 1145146 Change-Id: Iac29ca9a3799fdbdf19fffc52b23650111bc1138 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2533687Reviewed-by:Robert Flack <flackr@chromium.org> Commit-Queue: Shimi Zhang <ctzsm@chromium.org> Cr-Commit-Position: refs/heads/master@{#826915}
Showing
Please register or sign in to comment