From adda161ec6811c5c4f18ffe99c3c1f20a77816e1 Mon Sep 17 00:00:00 2001 From: player-03 Date: Wed, 5 Apr 2023 16:36:36 -0400 Subject: [PATCH] Use "password" text input only on Android. Using `userAgent` to tell whether the app is running on Android. This isn't foolproof, but will work more often than the previous approach (where you chose at compile time and your choice applied to all devices). Resolves #1655. --- src/lime/_internal/backend/html5/HTML5Window.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lime/_internal/backend/html5/HTML5Window.hx b/src/lime/_internal/backend/html5/HTML5Window.hx index 55ddbc061..ca481b681 100644 --- a/src/lime/_internal/backend/html5/HTML5Window.hx +++ b/src/lime/_internal/backend/html5/HTML5Window.hx @@ -1119,7 +1119,7 @@ class HTML5Window textInput.type = 'text'; #else // use password instead of text to avoid IME issues on Android - textInput.type = 'password'; + textInput.type = Browser.navigator.userAgent.indexOf("Android") >= 0 ? 'password' : 'text'; #end textInput.style.position = 'absolute'; textInput.style.opacity = "0";