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

Commit a752a949 authored by Grace Kloba's avatar Grace Kloba
Browse files

If we get TOUCH_UP before getting the WebCore's

response for TOUCH_DOWN, remove the pending TOUCH_EVENT
before proceeding to fling.

This is partial fix for 
http://b/issue?id=2450534
parent a406fb90
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -4441,6 +4441,14 @@ public class WebView extends AbsoluteLayout
                            if (mFullScreenHolder == null
                                    && (computeHorizontalScrollExtent() < computeHorizontalScrollRange()
                                    || computeVerticalScrollExtent() < computeVerticalScrollRange())) {
                                // remove the pending TOUCH_EVENT and send a
                                // cancel
                                mWebViewCore
                                        .removeMessages(EventHub.TOUCH_EVENT);
                                WebViewCore.TouchEventData ted = new WebViewCore.TouchEventData();
                                ted.mAction = MotionEvent.ACTION_CANCEL;
                                mWebViewCore.sendMessage(EventHub.TOUCH_EVENT,
                                        ted);
                                // we will not rewrite drag code here, but we
                                // will try fling if it applies.
                                WebViewCore.pauseUpdate(mWebViewCore);