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

Commit 5b2c056a authored by Grace Kloba's avatar Grace Kloba
Browse files

Keep the scrollbar on during TOUCH_MOVE events even

when there is no movement.

Fix http://b/issue?id=2151115
parent ade1aacf
Loading
Loading
Loading
Loading
+19 −2
Original line number Diff line number Diff line
@@ -3871,11 +3871,25 @@ public class WebView extends AbsoluteLayout

                    if (mSnapScrollMode == SNAP_X
                            || mSnapScrollMode == SNAP_X_LOCK) {
                        if (deltaX == 0) {
                            // keep the scrollbar on the screen even there is no
                            // scroll
                            awakenScrollBars(ViewConfiguration
                                    .getScrollDefaultDelay(), false);
                        } else {
                            scrollBy(deltaX, 0);
                        }
                        mLastTouchX = x;
                    } else if (mSnapScrollMode == SNAP_Y
                            || mSnapScrollMode == SNAP_Y_LOCK) {
                        if (deltaY == 0) {
                            // keep the scrollbar on the screen even there is no
                            // scroll
                            awakenScrollBars(ViewConfiguration
                                    .getScrollDefaultDelay(), false);
                        } else {
                            scrollBy(0, deltaY);
                        }
                        mLastTouchY = y;
                    } else {
                        scrollBy(deltaX, deltaY);
@@ -3900,6 +3914,9 @@ public class WebView extends AbsoluteLayout
                }

                if (done) {
                    // keep the scrollbar on the screen even there is no scroll
                    awakenScrollBars(ViewConfiguration.getScrollDefaultDelay(),
                            false);
                    // return false to indicate that we can't pan out of the
                    // view space
                    return false;