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

Commit c43db491 authored by John Reck's avatar John Reck Committed by Android (Google) Code Review
Browse files

Merge "Fix android:focusableInTouchMode support" into jb-dev

parents c1c14065 435e6f5f
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
@@ -634,6 +634,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>