Skip to content

Conversation

@mutedSpectre
Copy link

(add) added a condition to the check for inputType number.

  • What does this PR do?
    Paste from clipboard returned to work if inputType number on desktop.

  • Any background context you want to provide?
    When the handleKeyDown function checks for keys pressed from the keyboard, the condition for inputType number validated the values, and ControlLeft and V returned false when validated in the isInputValueValid function, which combined with the negation of the boolean triggered event.preventDefault, and the handlePaste function was not even called. I added a condition that ignored the last V and Insert, which does not block further execution of the event, and the handlePaste method is called correctly when Ctrl + V and Shift + Insert are combined. I suspect that my solution might not look elegant enough, but combined with the checks elsewhere, V and Insert can't get into Input in this case.

- (add) added a condition to the check for inputType number.
@prateek3255
Copy link
Contributor

This has been fixed with #407

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

Successfully merging this pull request may close these issues.

2 participants