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

Initial Values Added to Masked Text Box Placeholder Overlayed #15

Open
ZoomPicard opened this issue Mar 7, 2019 · 3 comments
Open

Initial Values Added to Masked Text Box Placeholder Overlayed #15

ZoomPicard opened this issue Mar 7, 2019 · 3 comments

Comments

@ZoomPicard
Copy link

Loading in an initial value into a text box with the library enabled will mean the placeholder is drawn under the text.

I tried to call various events to fix this issue but found a small change to the code based worked by hiding the placeholder if there is already a value in the text box:

createShell : function (t) {
  ....

    mask.appendChild(emphasis);
    //Don't add placeholder if data already exists
    if (t.value.length == 0) {
        mask.appendChild(placeholder);
    }

   ....

  }
@whitespacecode
Copy link

I made a proper fix in this pull request:
#16

@ZoomPicard
Copy link
Author

Thank you

@Auer111
Copy link

Auer111 commented Aug 25, 2020

I just masked initial text in the filed at activateMasking t.dispatchEvent(new Event("input", { bubbles: false, cancelable: false }));

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

No branches or pull requests

3 participants