Skip to content

Commit

Permalink
Fix #7039 : Correct Event handling for Cut Command (#7127)
Browse files Browse the repository at this point in the history
* handle cut operation correctly by adjusting keydown handling.

* Update InputNumber.js

---------

Co-authored-by: Melloware <[email protected]>
  • Loading branch information
Sumeet-2023 and melloware authored Sep 7, 2024
1 parent 692524b commit ef05cdd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/lib/inputnumber/InputNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,12 @@ export const InputNumber = React.memo(
}

if (event.altKey || event.ctrlKey || event.metaKey) {
isSpecialChar.current = true;
// #7039 Treat cut as normal character
if (event.key.toLowerCase() === 'x' && (event.ctrlKey || event.metaKey)) {
isSpecialChar.current = false;
} else {
isSpecialChar.current = true;
}

return;
}
Expand Down

0 comments on commit ef05cdd

Please sign in to comment.