From bb4456cb364fd9189a28393f9dc0d4378add07e4 Mon Sep 17 00:00:00 2001 From: mithun522 Date: Mon, 15 Apr 2024 08:19:49 +0530 Subject: [PATCH 1/2] Fix #41899 --- packages/mui-joy/src/Button/Button.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/mui-joy/src/Button/Button.tsx b/packages/mui-joy/src/Button/Button.tsx index 75f3d037825f8d..8ab405bed9c24b 100644 --- a/packages/mui-joy/src/Button/Button.tsx +++ b/packages/mui-joy/src/Button/Button.tsx @@ -165,6 +165,7 @@ export const getButtonStyles = ({ // this has to come after the variant styles to take effect. [`&.${buttonClasses.loading}`]: { color: 'transparent', + userSelect: 'none', }, }), }, From 0063dfcb0d301c902b9761d1615d65c742062fe0 Mon Sep 17 00:00:00 2001 From: mithun522 Date: Mon, 15 Apr 2024 14:04:51 +0530 Subject: [PATCH 2/2] added the userSelect style unconditionally --- packages/mui-joy/src/Button/Button.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mui-joy/src/Button/Button.tsx b/packages/mui-joy/src/Button/Button.tsx index 8ab405bed9c24b..30638d94f6730a 100644 --- a/packages/mui-joy/src/Button/Button.tsx +++ b/packages/mui-joy/src/Button/Button.tsx @@ -139,6 +139,7 @@ export const getButtonStyles = ({ border: 'none', backgroundColor: 'transparent', cursor: 'pointer', + userSelect: 'none', display: 'inline-flex', alignItems: 'center', justifyContent: 'center', @@ -165,7 +166,6 @@ export const getButtonStyles = ({ // this has to come after the variant styles to take effect. [`&.${buttonClasses.loading}`]: { color: 'transparent', - userSelect: 'none', }, }), },