diff --git a/src/input/Input.tsx b/src/input/Input.tsx index 1b38a8882d..f3d5f367ae 100644 --- a/src/input/Input.tsx +++ b/src/input/Input.tsx @@ -301,6 +301,8 @@ const Input = forwardRefWithStatics( // https://github.com/Tencent/tdesign-react/issues/2320 function handleMouseDown(e: React.MouseEvent) { e.stopPropagation(); + // 兼容React16 + e.nativeEvent.stopImmediatePropagation(); } function handleClear(e: React.MouseEvent) { onChange?.('', { e, trigger: 'clear' }); diff --git a/src/range-input/RangeInput.tsx b/src/range-input/RangeInput.tsx index 4f4d141d6c..dc5eb76632 100644 --- a/src/range-input/RangeInput.tsx +++ b/src/range-input/RangeInput.tsx @@ -104,6 +104,8 @@ const RangeInput = React.forwardRef) { e.stopPropagation(); + // 兼容React16 + e.nativeEvent.stopImmediatePropagation(); } function handleClear(e: React.MouseEvent) {