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

feat(core): new built-in maskitoStrictCompositionPlugin #881

Merged
merged 3 commits into from
Jan 10, 2024

Conversation

nsbarsukov
Copy link
Member

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactoring
  • Build or CI related changes
  • Tests related changes
  • Documentation content changes

What is the current behaviour?

Closes #858

What is the new behaviour?

By default, Maskito does not break IME Composition and waits until compositionend fires to begin calibration of the textfield's value. It is especially important for East Asian languages such as Chinese, Japanese, Korean, and other languages with complex characters.

However, sometimes this behaviour is not desired and you can want to enable mask validation on every keystroke (to be like a classic not-composition input). For example, some Android devices with enabled system autocomplete can interpret user's input as part of composition event – waiting for compositionend can be not required for some cases (e.g. entering of numbers or your application is not used by East Asian clients). For this cases, you can use maskitoStrictCompositionPlugin. It applies mask's constraints on ANY intermediate value of IME composition.

Copy link
Contributor

Visit the preview URL for this PR (updated for commit 150870f):

https://maskito--pr881-composition-event-an-yyynxdxk.web.app

(expires Thu, 11 Jan 2024 09:15:14 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 61e4dea776cbea516b68c67840913d2edd88bb90

@nsbarsukov nsbarsukov marked this pull request as ready for review January 10, 2024 09:24
@github-actions github-actions bot added the ready to merge ready label Jan 10, 2024
@nsbarsukov nsbarsukov merged commit 74dddd5 into main Jan 10, 2024
34 checks passed
@nsbarsukov nsbarsukov deleted the composition-event-android branch January 10, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀 - New plugin to enable validation on every keystroke for composition event (IME)
3 participants