From ef05cdd0bd3077ac1aaab6e25ffbd855257f7b1a Mon Sep 17 00:00:00 2001 From: Sumeet Mourya <150683936+Sumeet-2023@users.noreply.github.com> Date: Sat, 7 Sep 2024 14:38:16 +0200 Subject: [PATCH] Fix #7039 : Correct Event handling for Cut Command (#7127) * handle cut operation correctly by adjusting keydown handling. * Update InputNumber.js --------- Co-authored-by: Melloware --- components/lib/inputnumber/InputNumber.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/lib/inputnumber/InputNumber.js b/components/lib/inputnumber/InputNumber.js index 4b91d220f3..141e2c9bd6 100644 --- a/components/lib/inputnumber/InputNumber.js +++ b/components/lib/inputnumber/InputNumber.js @@ -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; }