diff --git a/components/_util/ActionButton.tsx b/components/_util/ActionButton.tsx index 00c5dbc8a289..410e9aad2413 100644 --- a/components/_util/ActionButton.tsx +++ b/components/_util/ActionButton.tsx @@ -62,6 +62,7 @@ const ActionButton: React.FC = (props) => { setLoading(true); returnValueOfOnOk!.then( (...args: any[]) => { + setLoading(false, true); onInternalClose(...args); clickedRef.current = false; }, diff --git a/components/modal/style/index.tsx b/components/modal/style/index.tsx index 81a05f00007e..3443452fbfbd 100644 --- a/components/modal/style/index.tsx +++ b/components/modal/style/index.tsx @@ -1,9 +1,9 @@ import type React from 'react'; +import { clearFix, genFocusStyle, resetComponent } from '../../style'; import { initFadeMotion, initZoomMotion } from '../../style/motion'; import type { AliasToken, FullToken, GenerateStyle } from '../../theme/internal'; import { genComponentStyleHook, mergeToken } from '../../theme/internal'; import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook'; -import { clearFix, genFocusStyle, resetComponent } from '../../style'; /** Component only token. Which will handle additional calculation of alias token */ export interface ComponentToken { @@ -47,12 +47,12 @@ function box(position: React.CSSProperties['position']): React.CSSProperties { } export const genModalMaskStyle: GenerateStyle> = (token) => { - const { componentCls } = token; + const { componentCls, antCls } = token; return [ { [`${componentCls}-root`]: { - [`${componentCls}${token.antCls}-zoom-enter, ${componentCls}${token.antCls}-zoom-appear`]: { + [`${componentCls}${antCls}-zoom-enter, ${componentCls}${antCls}-zoom-appear`]: { // reset scale avoid mousePosition bug transform: 'none', opacity: 0, @@ -61,6 +61,12 @@ export const genModalMaskStyle: GenerateStyle> = userSelect: 'none', }, + // https://github.com/ant-design/ant-design/issues/37329 + // https://github.com/ant-design/ant-design/issues/40272 + [`${componentCls}${antCls}-zoom-leave ${componentCls}-content`]: { + pointerEvents: 'none', + }, + [`${componentCls}-mask`]: { ...box('fixed'), zIndex: token.zIndexPopupBase, @@ -349,11 +355,6 @@ const genModalConfirmStyle: GenerateStyle = (token) => { [`${confirmComponentCls}-success ${confirmComponentCls}-body > ${token.iconCls}`]: { color: token.colorSuccess, }, - - // https://github.com/ant-design/ant-design/issues/37329 - [`${componentCls}-zoom-leave ${componentCls}-btns`]: { - pointerEvents: 'none', - }, }; }; diff --git a/scripts/post-script.js b/scripts/post-script.js index 767f5cbdbcf4..d8d61c42f3ed 100644 --- a/scripts/post-script.js +++ b/scripts/post-script.js @@ -29,6 +29,9 @@ const DEPRECIATED_VERSION = { '5.1.2': ['https://github.com/ant-design/ant-design/issues/39949'], '5.1.3': ['https://github.com/ant-design/ant-design/issues/40113'], '5.1.4': ['https://github.com/ant-design/ant-design/issues/40186'], + '>= 5.2.3 <= 5.3.0': [ + 'https://github.com/ant-design/ant-design/pull/40719#issuecomment-1453418135', + ], }; function matchDeprecated(version) {