Skip to content
This repository was archived by the owner on Jun 28, 2026. It is now read-only.

Commit 5ba41be

Browse files
authored
fix: block float paste in integeronly input (#8222)
1 parent 37ba978 commit 5ba41be

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

components/lib/inputnumber/InputNumber.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,10 @@ export const InputNumber = React.memo(
585585

586586
let data = (event.clipboardData || window.clipboardData).getData('Text');
587587

588+
if (props.inputId === 'integeronly' && /[^\d-]/.test(data)) {
589+
return;
590+
}
591+
588592
if (data) {
589593
let filteredData = parseValue(data);
590594

0 commit comments

Comments
 (0)