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

add option: hide mask only if value is empty (without mouse events) #1302

Open
nemiro opened this issue Jun 17, 2016 · 5 comments
Open

add option: hide mask only if value is empty (without mouse events) #1302

nemiro opened this issue Jun 17, 2016 · 5 comments

Comments

@nemiro
Copy link

nemiro commented Jun 17, 2016

I'm using mask with that props:
... , showMaskOnHover: false , showMaskOnFocus: true , clearMaskOnLostFocus: false , clearMaskOnEmpty : true // NEW , clearIncomplete: false , autoUnmask: false ...

the main idea is that mask visible only when we are focusing at input (no mouse event), and should be visible always excepts empty value. can't use clearIncomplete , because it will clear value it is not complete, but I don't want it. can't use clearMaskOnLostFocus , because I'm not using mouse event.

the main problem is ie11, that forces focus event on placeholder change, so I can't clean up mask from within without re-focusing to the field. I can do pull request or something to show the idea.

@RobinHerbots
Copy link
Owner

@nemiro ,

Can you make a jsfiddle to make it more visible.

@vbgm
Copy link

vbgm commented Jan 14, 2019

+1

@nemiro
Copy link
Author

nemiro commented Jan 17, 2019

@nemiro ,

Can you make a jsfiddle to make it more visible.

yeap, sorry, missed the comment above, will do

@nemiro
Copy link
Author

nemiro commented Jan 24, 2019

example for 4.0.4 version
see /*inemiro::*/ comment at the inputmask.js
https://embed.plnkr.co/32Yhomx5eyhs1IJus5Xj/

@nemiro
Copy link
Author

nemiro commented Feb 11, 2019

can close current issue.
made new pull to latest HEAD version
#2064

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants