From e30a8aee558ceef41981633269dd7162f545309d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=82=9C=E6=99=A8?= <> Date: Mon, 15 Sep 2025 16:36:35 +0800 Subject: [PATCH] fix(Input): hide default browser search cancel button when allowClear is used (#8356) --- components/input/style/index.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/components/input/style/index.ts b/components/input/style/index.ts index 7653f78707..55d8030151 100644 --- a/components/input/style/index.ts +++ b/components/input/style/index.ts @@ -200,6 +200,16 @@ export const genBasicInputStyle = (token: InputToken): CSSObject => ({ '&-textarea-rtl': { direction: 'rtl', }, + + // Hide default browser search clear button + '&[type="search"]::-webkit-search-cancel-button': { + display: 'none', + }, + '&[type="search"]::-ms-clear': { + display: 'none', + width: 0, + height: 0, + }, }); export const genInputGroupStyle = (token: InputToken): CSSObject => {