Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Android browser text input #263

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

DigiEggz
Copy link
Contributor

@DigiEggz DigiEggz commented Dec 21, 2023

Some Android browsers can not type in text input fields. I leveraged window.onTextInput to detect text changes and refactored code to remove redundancies and improve performance. Some mobile targets also require touch detection. Fixes #262.

I've tested typing and pasting text on desktop, mobile and web (both GeckoView and WebView browsers). These changes are also working with the latest versions of OpenFL and Lime.

Some Android browsers can not type in text input fields. I leveraged window.onTextInput to detect text changes and refactored code to remove redundancies and improve performance. Some mobile targets also require touch detection.

I've tested typing and pasting text on desktop, mobile and web (both GeckoView and WebView browsers). These changes are working with the latest versions of OpenFL and Lime.
Only add new listener code for mobile since Chromium-based Android browsers are not receiving keyDown events. Experienced problems pasting text longer than 32 characters on Android builds, so we use a hybrid of the two.
@DigiEggz
Copy link
Contributor Author

It has been really sticky trying to make sure all desktop, native mobile, web (both mobile and desktop browsers, including testing for Firefox and Chrome on both) builds perform the same. The latest commit uses a hybrid method because native Android builds were experiencing an issue getting very long strings from the clipboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chromium browsers on Android only shows numeric input
1 participant