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

Commit 94c715d6 authored by Grace Kloba's avatar Grace Kloba
Browse files

Skip requestRectangleOnScreen for WebTextView during

zoom animation. If it is in edit mode, we already adjust
WebTextView in the end of zoom animation.

Fix part 1 of http://b/issue?id=2147168
parent ff966d5f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -813,4 +813,14 @@ import java.util.ArrayList;
    /* package */ void updateCachedTextfield() {
        mWebView.updateCachedTextfield(getText().toString());
    }

    @Override
    public boolean requestRectangleOnScreen(Rect rectangle) {
        // don't scroll while in zoom animation. When it is done, we will adjust
        // the WebTextView if it is in editing mode.
        if (!mWebView.inAnimateZoom()) {
            return super.requestRectangleOnScreen(rectangle);
        }
        return false;
    }
}
+4 −0
Original line number Diff line number Diff line
@@ -2814,6 +2814,10 @@ public class WebView extends AbsoluteLayout
        }
    }

    boolean inAnimateZoom() {
        return mZoomScale != 0;
    }

    /**
     * Need to adjust the WebTextView after a change in zoom, since mActualScale
     * has changed.  This is especially important for password fields, which are