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

Field cleared after losing focus on Chinese and other layout using IME #717

Open
glebovpavel opened this issue Aug 10, 2021 · 2 comments
Open
Labels
🌐 i18n Internationalization & localisation issues

Comments

@glebovpavel
Copy link

Current behavior

On MS Windows 10.0.18363.1679
If user has Chinese Keyboard Layout and Input Mode is Chinese -> after input a number the field cleared after losing focus.

Expected behavior

Filed is not cleared after loosing focus.

Steps to reproduce the problem

  1. Use autoNumeric version: 4.6.0
  2. In the browser Firefox 69.0b9, Chrome

Link to live example

One can reproduce it on any input field on http://autonumeric.org/guide

@glebovpavel
Copy link
Author

This happens because "keydown" - event not raised by IME https://en.wikipedia.org/wiki/Input_method
https://developer.mozilla.org/en-US/docs/Web/API/Document/keydown_event#ignoring_keydown_during_ime_composition
in modern browsers.

The workaround I found is to disable IME for the field by

  1. ime-mode: disabled - works in Firefox only https://developer.mozilla.org/en-US/docs/Web/CSS/ime-mode
  2. Set input type as "tel" fro input filed like

@glebovpavel glebovpavel changed the title Field cleared after loosing focus on Chinese Layout Field cleared after losing focus on Chinese Layout Aug 12, 2021
@glebovpavel glebovpavel changed the title Field cleared after losing focus on Chinese Layout Field cleared after losing focus on Chinese and other layout using IME Aug 12, 2021
@AlexandreBonneau AlexandreBonneau added the 🌐 i18n Internationalization & localisation issues label Oct 1, 2021
@yurikuzn
Copy link

Are there any other workarounds? ime-mode seems is dropped out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌐 i18n Internationalization & localisation issues
Projects
None yet
Development

No branches or pull requests

3 participants