From a09e1ad921756ca633e0b3c7a170bedf02dbfc6b Mon Sep 17 00:00:00 2001 From: Chang Wei <867597730@qq.com> Date: Tue, 26 Oct 2021 13:33:21 +0800 Subject: [PATCH] fix: Avoid selecting the placeholder of input control on Chrome browser, keep consistent of selection behavior with Firefox browser (#32639) --- components/style/mixins/compatibility.less | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/style/mixins/compatibility.less b/components/style/mixins/compatibility.less index 0c6d517cd8..fb1782ceeb 100644 --- a/components/style/mixins/compatibility.less +++ b/components/style/mixins/compatibility.less @@ -15,4 +15,10 @@ &:placeholder-shown { text-overflow: ellipsis; } + + // Chrome + /* stylelint-disable-next-line selector-no-vendor-prefix */ + &::-webkit-input-placeholder { + user-select: none; + } }