From a6a766c5e349e0605f97bacbef2b39cd65e166f6 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 26 May 2020 11:44:47 +0800 Subject: [PATCH] fix: Select cannot paste string close https://github.com/ant-design/ant-design/issues/24461 --- src/Selector/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Selector/index.tsx b/src/Selector/index.tsx index 50c46f44e..752e8edc1 100644 --- a/src/Selector/index.tsx +++ b/src/Selector/index.tsx @@ -159,6 +159,10 @@ const Selector: React.RefForwardingComponent = }; const onInputPaste: React.ClipboardEventHandler = e => { + // github.com/ant-design/ant-design/issues/24461 + if ((e.target as HTMLInputElement).value) { + return; + } const { clipboardData } = e; const value = clipboardData.getData('text');