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

Non lazy does not show the placeholder initially #1035

Open
schogges opened this issue Apr 24, 2024 · 3 comments
Open

Non lazy does not show the placeholder initially #1035

schogges opened this issue Apr 24, 2024 · 3 comments

Comments

@schogges
Copy link

schogges commented Apr 24, 2024

Describe the bug
I am using react-imask with lazy set to false to make the placeholder/pattern always visible. This worked fine until react-imask@7.5.0 and imask@7.5.0, but with 7.6.0 the placeholder is not shown when mounting the masked input. It appears after at least one character has been entered or turning lazy on and off again.

To Reproduce

Expected behavior
When setting lazy to false, I expect to see the placeholder/pattern at any time. I expect to see it after mounting, the first render and entering a value.

Environment:

  • OS: macOS 14.4.1
  • Browser: Brave Version 1.65.114 Chromium: 124.0.6367.60 (Official Build) (arm64), Firefox 125.0.2 (64-bit)
  • IMask version: 7.6.0
  • Framework/plugin: React

Additional context

Screen.Recording.2024-04-24.at.11.58.14.mov
Screen.Recording.2024-04-24.at.11.59.14.mov
@Squixx
Copy link

Squixx commented May 1, 2024

seeing the same behaviour in angular

@nyates42
Copy link

nyates42 commented May 6, 2024

I'm also having the same issue. Was not a problem before but something must have changed.

@npearson72
Copy link

As a work around, I've added a placeholder on the actual input that matches what the mask appears like. But it seems redundant. Indeed lazy false used to work more elegantly in the past, just as this issue describes.

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

4 participants