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

Commit 843bbb85 authored by Cary Clark's avatar Cary Clark
Browse files

reset select/copy state if key is pressed while shift is down

If a webpage suppresses keys from getting echoed back to the
browser app, then also disable select/copy when a key follows
a shift key press.

Also add in missing debug string to permit debug builds.
parent b4bf5620
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -3180,6 +3180,15 @@ public class WebView extends AbsoluteLayout
            return false;
        }

        if (keyCode != KeyEvent.KEYCODE_SHIFT_LEFT
                && keyCode != KeyEvent.KEYCODE_SHIFT_RIGHT) {
            // turn off copy select if a shift-key combo is pressed
            mExtendSelection = mShiftIsPressed = false;
            if (mTouchMode == TOUCH_SELECT_MODE) {
                mTouchMode = TOUCH_INIT_MODE;
            }
        }

        if (getSettings().getNavDump()) {
            switch (keyCode) {
                case KeyEvent.KEYCODE_4:
+1 −0
Original line number Diff line number Diff line
@@ -545,6 +545,7 @@ final class WebViewCore {
            "LOAD_DATA", // = 139;
            "TOUCH_UP", // = 140;
            "TOUCH_EVENT", // = 141;
            "SET_ACTIVE", // = 142;
        };

    class EventHub {