wirecardBrasil / awesome-mask

The awesome-mask runs with Vue.js and uses the vanilla-masker to make your form awesome with masks.
MIT License
165 stars 22 forks source link

Unsupported characters kept on the value after blur #8

Closed guilhermewaess closed 7 years ago

guilhermewaess commented 7 years ago

Hi fellows!

First of all, nice work, is always good to have people in a private companies opening usefull codes for a community

I'm looking for a input mask to use on my project, and testing your demo, I found a strange behavior, for example:

On car plate, first 3 characters must be a letter, if I type a number, and get out the focus of the component, the number stayed on field... I'm not sure if the number still on value var, but is weird to see a number instead a letter.

image

Maybe this problem is on keyDown event: el.addEventListener('keydown', inputHandler), maybe is better keyUp event. But is just a shot, I really dont know the code ;)

Well is it.

caioincau commented 7 years ago

Thanks @guilhermewaess , the tab was working, I can reproduce the problem with direct click on another field.

Already patched: https://github.com/moip/awesome-mask/pull/9