From 7bcf5172aa454967ee05902fb97d867ef57e0aa8 Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Tue, 27 Apr 2010 11:45:38 -0700 Subject: [PATCH] Fix a WebView scrolling regression - bug 2633572. Update mLastTouchX/Y on every drag. This prevents the creation of dead zones that the user has to drag back out of at the edges of a document. Change-Id: I348d96dfd3907dba7c6ddd86b678329d65063ba9 --- core/java/android/webkit/WebView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 6f4c6ffc8708..6b316ceee65e 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -4814,6 +4814,8 @@ public class WebView extends AbsoluteLayout boolean done = false; boolean keepScrollBarsVisible = false; if (Math.abs(fDeltaX) < 1.0f && Math.abs(fDeltaY) < 1.0f) { + mLastTouchX = x; + mLastTouchY = y; keepScrollBarsVisible = done = true; } else { if (mSnapScrollMode == SNAP_X || mSnapScrollMode == SNAP_Y) { @@ -4865,6 +4867,8 @@ public class WebView extends AbsoluteLayout } else { // keep the scrollbar on the screen even there is no // scroll + mLastTouchX = x; + mLastTouchY = y; keepScrollBarsVisible = true; } mLastTouchTime = eventTime; -- 2.11.0