RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.4k stars 2.17k forks source link

Optional mask with greedy: true does not behave greedily #1913

Open fchristl opened 6 years ago

fchristl commented 6 years ago

I have an input with a mask like this:

$('#tel').inputmask({
    mask: '+ # # - (0) (# ){2,4} - (# ){3,6}',
    greedy: true
});

When I focus the input field, the mask becomes:

+ _ _ - (0) _ _  - _ _ _ 

My understanding is that this is not a greedy behavior, as it only shows three instead of six placeholders in the end. What I would expect is

+ _ _ - (0) _ _  - _ _ _ _ _ _ _

Am I missing something or this actually a bug?

RobinHerbots commented 6 years ago

@fchristl ,

This is more like a missing feature in the repeats.

But I would expect it to be like below, if implemented.

+ _ _ - (0) _ _ _ _  - _ _ _ _ _ _ _