-
Notifications
You must be signed in to change notification settings - Fork 52
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
Support pasting codes as "XXX-XXX" #53
Comments
@necky2 thanks for bringing that up. While I still can't think of a great solution for this, there's a workaround such as handling onPaste event. That would require a change on the current implementation, because it's always calling the library's default pasteListener. If I allow for the user/developer setting up a custom paste event listener over the default library behavior, then it should be possible. I'm also not sure whether or not |
@guilhermerodz Pasting should really be a thing. From how I know the usage behaviour, the majority of people still use plain old copy and paste. |
Any update on this? Even just allowing me to reformat the pasted value before the built-in |
I removed the hyphen from the emails that I send to customers, problem "solved". If you get this issue moving and support is added for this, I would still appreciate that. |
In our case, it's not a hyphen in between the code groups, but rather a prefix at the start of the code. Something like |
Is your feature request related to a problem? Please describe.
By my understanding, splitting a code into 2 parts is done for better user readability. This library supports and even suggests, configuring the input as "XXX-XXX". I think it's a problem that a code with a hyphen or space in the middle cannot be pasted into the field.
Describe the solution you'd like
Accept pasting of "XXX-XXX" and "XXX XXX" (and possibly other formats)
Describe alternatives you've considered
-
Additional context
I can have a shot at implementing this if others agree that this makes sense.
The text was updated successfully, but these errors were encountered: