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

Commit f7f07e57 authored by Michael Kolb's avatar Michael Kolb
Browse files

Fix page scroll during text selection

    Bug: 3190609
    Leave embedded title bar in place during text selection CAB mode

Change-Id: I7140241ac7eeb442cfe7665580525d8cdfce220f
parent 62490bd3
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -25,15 +25,12 @@ import android.view.View;

class SelectActionModeCallback implements ActionMode.Callback {
    private WebView mWebView;
    private View mTitleBar;
    private ActionMode mActionMode;

    void setWebView(WebView webView) {
        mWebView = webView;
    }

    void setTitleBar(View v) { mTitleBar = v; }

    void finish() {
        mActionMode.finish();
    }
@@ -86,7 +83,6 @@ class SelectActionModeCallback implements ActionMode.Callback {

    @Override
    public void onDestroyActionMode(ActionMode mode) {
        if (mTitleBar != null) mWebView.setEmbeddedTitleBar(mTitleBar);
        mWebView.selectionDone();
    }
}
+0 −9
Original line number Diff line number Diff line
@@ -2257,9 +2257,6 @@ public class WebView extends AbsoluteLayout
        if (null == v) {
            // If one of our callbacks is holding onto the titlebar to replace
            // it when its ActionMode ends, remove it.
            if (mSelectCallback != null) {
                mSelectCallback.setTitleBar(null);
            }
            if (mFindCallback != null) {
                mFindCallback.setTitleBar(null);
            }
@@ -4626,12 +4623,6 @@ public class WebView extends AbsoluteLayout
        nativeHideCursor();
        mSelectCallback = new SelectActionModeCallback();
        mSelectCallback.setWebView(this);
        View titleBar = mTitleBar;
        // We do not want to show the embedded title bar during find or
        // select, but keep track of it so that it can be replaced when the
        // mode is exited.
        setEmbeddedTitleBar(null);
        mSelectCallback.setTitleBar(titleBar);
        startActionMode(mSelectCallback);
    }