From e6f201f88216297d7b24e4eba3280f34dc392839 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Mon, 9 Sep 2024 14:48:50 +0700 Subject: [PATCH] fix(android): Allow external keyboard to work when OSK hidden --- .../KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java b/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java index 7d731f2b63d..2bffa482d9e 100644 --- a/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java +++ b/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboard.java @@ -366,9 +366,8 @@ public void loadJavascript(String func) { public void callJavascriptAfterLoad() { if(this.javascriptAfterLoad.size() > 0) { - // Don't call this WebView method on just ANY thread - run it on the main UI thread. - // https://stackoverflow.com/a/22611010 - this.postDelayed(new Runnable() { + Handler handler = new Handler(); + handler.postDelayed(new Runnable() { @Override public void run() { StringBuilder allCalls = new StringBuilder();