From 1edbfa627a3c6d3bf9b0d48fd80c2cf22d2d7852 Mon Sep 17 00:00:00 2001 From: Manuel Martin Date: Tue, 7 Jul 2020 10:49:53 +0200 Subject: [PATCH 1/2] Null check the alphabetic Caps Keyboard when switching shift --- .../org/mozilla/vrbrowser/ui/widgets/KeyboardWidget.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/KeyboardWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/KeyboardWidget.java index 391d669e7..c2403dfef 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/KeyboardWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/KeyboardWidget.java @@ -746,7 +746,10 @@ private void handleShift(boolean isShifted) { if (mKeyboardView.getKeyboard() != getSymbolsKeyboard()) { if (isShifted || mIsCapsLock) { - mKeyboardView.setKeyboard(mCurrentKeyboard.getAlphabeticCapKeyboard()); + if (mCurrentKeyboard.getAlphabeticCapKeyboard() != null) { + mKeyboardView.setKeyboard(mCurrentKeyboard.getAlphabeticCapKeyboard()); + } + } else { mKeyboardView.setKeyboard(mCurrentKeyboard.getAlphabeticKeyboard()); } From e0e62e17f862ecb45976f136475db92fbd014ce5 Mon Sep 17 00:00:00 2001 From: Manuel Martin Date: Tue, 7 Jul 2020 11:02:54 +0200 Subject: [PATCH 2/2] Return to alphabetic Thai keyboard after inserting a character --- .../shared/org/mozilla/vrbrowser/ui/widgets/KeyboardWidget.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/KeyboardWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/KeyboardWidget.java index c2403dfef..d238f565a 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/KeyboardWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/KeyboardWidget.java @@ -1049,7 +1049,7 @@ private void handleText(String aText, boolean skipCase) { postInputCommand(() -> connection.commitText(text, 1)); } - if (!mIsCapsLock && mCurrentKeyboard.getAlphabeticCapKeyboard() == null) { + if (!mIsCapsLock) { handleShift(false); }