(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.
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 theisInputValueValid
function, which combined with the negation of the boolean triggeredevent.preventDefault
, and thehandlePaste
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 thehandlePaste
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.