Skip to content

Commit

Permalink
fix: Popconfirm loading should finish (ant-design#41121)
Browse files Browse the repository at this point in the history
* fix: Popconfirm loading should finish

* chore: update bug version
  • Loading branch information
zombieJ authored and RedJue committed Apr 25, 2023
1 parent 3c13714 commit 8014ba3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions components/_util/ActionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const ActionButton: React.FC<ActionButtonProps> = (props) => {
setLoading(true);
returnValueOfOnOk!.then(
(...args: any[]) => {
setLoading(false, true);
onInternalClose(...args);
clickedRef.current = false;
},
Expand Down
17 changes: 9 additions & 8 deletions components/modal/style/index.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -47,12 +47,12 @@ function box(position: React.CSSProperties['position']): React.CSSProperties {
}

export const genModalMaskStyle: GenerateStyle<TokenWithCommonCls<AliasToken>> = (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,
Expand All @@ -61,6 +61,12 @@ export const genModalMaskStyle: GenerateStyle<TokenWithCommonCls<AliasToken>> =
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,
Expand Down Expand Up @@ -349,11 +355,6 @@ const genModalConfirmStyle: GenerateStyle<ModalToken> = (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',
},
};
};

Expand Down
3 changes: 3 additions & 0 deletions scripts/post-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8014ba3

Please sign in to comment.