diff --git a/components/checkbox/style/mixin.less b/components/checkbox/style/mixin.less
index 60c8201a5e..c16a3f091a 100644
--- a/components/checkbox/style/mixin.less
+++ b/components/checkbox/style/mixin.less
@@ -122,6 +122,7 @@
.@{checkbox-prefix-cls}-input {
cursor: not-allowed;
+ pointer-events: none;
}
.@{checkbox-inner-prefix-cls} {
diff --git a/components/tooltip/__tests__/__snapshots__/tooltip.test.js.snap b/components/tooltip/__tests__/__snapshots__/tooltip.test.js.snap
index 718c3d35ee..776998c5f7 100644
--- a/components/tooltip/__tests__/__snapshots__/tooltip.test.js.snap
+++ b/components/tooltip/__tests__/__snapshots__/tooltip.test.js.snap
@@ -16,32 +16,6 @@ exports[`Tooltip should hide when mouse leave antd disabled component Button 1`]
`;
-exports[`Tooltip should hide when mouse leave antd disabled component Checkbox 1`] = `
-
-
-
-`;
-
exports[`Tooltip should hide when mouse leave antd disabled component Switch 1`] = `
{
testComponent('Button', Button);
testComponent('Switch', Switch);
- testComponent('Checkbox', Checkbox);
});
it('should render disabled Button style properly', () => {
diff --git a/components/tooltip/index.tsx b/components/tooltip/index.tsx
index 8842bb7c84..ee5beaf753 100644
--- a/components/tooltip/index.tsx
+++ b/components/tooltip/index.tsx
@@ -87,7 +87,6 @@ function getDisabledCompatibleChildren(element: React.ReactElement, prefixC
if (
(elementType.__ANT_BUTTON === true ||
elementType.__ANT_SWITCH === true ||
- elementType.__ANT_CHECKBOX === true ||
element.type === 'button') &&
element.props.disabled
) {
@@ -130,9 +129,11 @@ function getDisabledCompatibleChildren(element: React.ReactElement, prefixC
}
const Tooltip = React.forwardRef((props, ref) => {
- const { getPopupContainer: getContextPopupContainer, getPrefixCls, direction } = React.useContext(
- ConfigContext,
- );
+ const {
+ getPopupContainer: getContextPopupContainer,
+ getPrefixCls,
+ direction,
+ } = React.useContext(ConfigContext);
const [visible, setVisible] = useMergedState(false, {
value: props.visible,