From ec58de91bed2e2fe4417777d431917448d88ff66 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Mon, 28 Jun 2021 04:56:52 +1000 Subject: [PATCH] feat(android): hide textarea for perf Relates to #5258. Unnecessary layout recalc eliminated by hiding the backing textarea with `display:none`. This improved performance by roughly 20%. --- android/KMEA/app/src/main/assets/keyboard.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/android/KMEA/app/src/main/assets/keyboard.html b/android/KMEA/app/src/main/assets/keyboard.html index 3d6b75aec5..83d27639f3 100644 --- a/android/KMEA/app/src/main/assets/keyboard.html +++ b/android/KMEA/app/src/main/assets/keyboard.html @@ -41,7 +41,7 @@ ta.readOnly = false; // Tell KMW the default banner height to use - com.keyman.osk.Banner.DEFAULT_HEIGHT = + com.keyman.osk.Banner.DEFAULT_HEIGHT = Math.ceil(window.jsInterface.getDefaultBannerHeight() / window.devicePixelRatio); kmw.addEventListener('keyboardloaded', setIsChiral); @@ -320,7 +320,7 @@ function executePopupKey(keyID, keyText) { var kmw=window['keyman']; - + // KMW only needs keyID to process the popup key. keyText merely logged to console //window.console.log('executePopupKey('+keyID+'); keyText: ' + keyText); kmw['executePopupKey'](keyID); @@ -366,8 +366,6 @@ -
- -
+