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

Android: FormControl not updating when using Samsung Keyboard app #1293

Open
hv-pul opened this issue Dec 19, 2023 · 0 comments
Open

Android: FormControl not updating when using Samsung Keyboard app #1293

hv-pul opened this issue Dec 19, 2023 · 0 comments

Comments

@hv-pul
Copy link

hv-pul commented Dec 19, 2023

🐞 bug report

Is this a regression?

No

Description

When using ngx-mask, inputs via the Samsung Keyboard app are not registered until the field is blurred.

Expected behavior
Inputs that are bound to a FormControl should behave the same when using ngx-mask as default inputs.

Observed behavior
The FormControl value does not update until field is blurred.

🔬 Minimal Reproduction

https://stackblitz.com/edit/stackblitz-starters-c2wvcg?file=src%2Fmain.ts

(FYI: The Stackblitz template that you link to is out of date, this is using the latest Angular & ngx-mask versions instead).

🌍 Your Environment

Angular Version:


17.07 (issue exists on 15.10 as well)

Anything else relevant?

We observed this behavior on Android 13 in Chrome 120.0.6099.115

The reason seems to be that Samsung Keyboard sends insertCompositionText events on typing, not insertText events, so ngx-mask sets _isComposing and skips updates. Google Gboard and Microsoft Swift keyboard apps work fine.

When not using ngx-mask, the behavior is different, so we think it would might correct to skip running the mask logic on insertCompositionText, but the original value should still be reflected to the FormControl.

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

No branches or pull requests

2 participants