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

Commit 435e6f5f authored by John Reck's avatar John Reck
Browse files

Fix android:focusableInTouchMode support

 Bug: 6448106

Change-Id: I17161754eaf08145623466a6db25893e3e5b2e16
parent ae147152
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -1598,8 +1598,6 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
    private void init() {
        OnTrimMemoryListener.init(mContext);
        mWebView.setWillNotDraw(false);
        mWebView.setFocusable(true);
        mWebView.setFocusableInTouchMode(true);
        mWebView.setClickable(true);
        mWebView.setLongClickable(true);

@@ -5767,14 +5765,15 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
            return false;
        }

        if (!mWebView.isFocused()) {
            mWebView.requestFocus();
        }

        if (mInputDispatcher == null) {
            return false;
        }

        if (mWebView.isFocusable() && mWebView.isFocusableInTouchMode()
                && !mWebView.isFocused()) {
            mWebView.requestFocus();
        }

        if (mInputDispatcher.postPointerEvent(ev, getScrollX(),
                getScrollY() - getTitleHeight(), mZoomManager.getInvScale())) {
            mInputDispatcher.dispatchUiEvents();
+1 −0
Original line number Diff line number Diff line
@@ -631,6 +631,7 @@ please see styles_device_defaults.xml.

    <style name="Widget.WebView">
        <item name="android:focusable">true</item>
        <item name="android:focusableInTouchMode">true</item>
        <item name="android:scrollbars">horizontal|vertical</item>
    </style>