RonaldJerez / vue-input-facade

A lightweight and dependency free input masking library created specific for Vue
https://ronaldjerez.github.io/vue-input-facade/latest/
182 stars 27 forks source link

fix(core.js): ignore composition text input events #45

Closed scottvanbrug closed 2 years ago

scottvanbrug commented 2 years ago

Ignore events triggered while composing text with an input method editor. Fixes up buggy behavior with some IMEs resulting in incorrect cursor placement or duplicated inputs while updating the input with a masked value.

Description

While using some IMEs - e.g. Pinyin (Simplified), Japanese Hiragana - updating the input value with a masked value while input text is being composed was causing text to be duplicated or for cursor positioning to be incorrectly updated. PR causes input events related to text composition to be ignored resulting in formatting and masking only being applied when the input composition is completed and text is inserted by the browser.

Checklist

RonaldJerez commented 2 years ago

Great work debugging this Scott! Thanks.

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 1.3.8 :tada:

The release is available on:

Your semantic-release bot :package::rocket: