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

Commit 413fab3f authored by John Reck's avatar John Reck
Browse files

Don't draw the focus ring if we don't have focus

Change-Id: Icb03060a03caf817ea39935bb56e14b5c86ed57b
parent 42f23b3c
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -5749,6 +5749,9 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
            setFocusControllerActive(false);
            mKeysPressed.clear();
        }
        if (!mTouchHighlightRegion.isEmpty()) {
            mWebView.invalidate(mTouchHighlightRegion.getBounds());
        }
    }

    void setGLRectViewport() {
@@ -5960,6 +5963,10 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
            return false;
        }

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

        if (DebugFlags.WEB_VIEW) {
            Log.v(LOGTAG, ev + " at " + ev.getEventTime()
                + " mTouchMode=" + mTouchMode
@@ -6349,7 +6356,6 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
                break;
            }
            case MotionEvent.ACTION_UP: {
                if (!mWebView.isFocused()) mWebView.requestFocus();
                // pass the touch events from UI thread to WebCore thread
                if (shouldForwardTouchEvent()) {
                    TouchEventData ted = new TouchEventData();
@@ -8521,7 +8527,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
            return false;
        }
        if (mFocusedNode.mHasFocus && !mWebView.isInTouchMode()) {
            return !mFocusedNode.mEditable;
            return mDrawCursorRing && !mFocusedNode.mEditable;
        }
        if (mFocusedNode.mHasFocus && mFocusedNode.mEditable) {
            return false;