mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 11:10:01 +08:00
fix: Modal open should not block dropdown hidden (#44204)
* refactor: adjust style * fix: not event when hovering * chore: add comment
This commit is contained in:
parent
72b449a1a4
commit
ee984fee0a
@ -62,10 +62,7 @@ export interface ModalToken extends FullToken<'Modal'> {
|
|||||||
function box(position: React.CSSProperties['position']): React.CSSProperties {
|
function box(position: React.CSSProperties['position']): React.CSSProperties {
|
||||||
return {
|
return {
|
||||||
position,
|
position,
|
||||||
top: 0,
|
inset: 0,
|
||||||
insetInlineEnd: 0,
|
|
||||||
bottom: 0,
|
|
||||||
insetInlineStart: 0,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,6 +92,7 @@ export const genModalMaskStyle: GenerateStyle<TokenWithCommonCls<AliasToken>> =
|
|||||||
zIndex: token.zIndexPopupBase,
|
zIndex: token.zIndexPopupBase,
|
||||||
height: '100%',
|
height: '100%',
|
||||||
backgroundColor: token.colorBgMask,
|
backgroundColor: token.colorBgMask,
|
||||||
|
pointerEvents: 'none',
|
||||||
|
|
||||||
[`${componentCls}-hidden`]: {
|
[`${componentCls}-hidden`]: {
|
||||||
display: 'none',
|
display: 'none',
|
||||||
@ -103,9 +101,16 @@ export const genModalMaskStyle: GenerateStyle<TokenWithCommonCls<AliasToken>> =
|
|||||||
|
|
||||||
[`${componentCls}-wrap`]: {
|
[`${componentCls}-wrap`]: {
|
||||||
...box('fixed'),
|
...box('fixed'),
|
||||||
|
zIndex: token.zIndexPopupBase,
|
||||||
overflow: 'auto',
|
overflow: 'auto',
|
||||||
outline: 0,
|
outline: 0,
|
||||||
WebkitOverflowScrolling: 'touch',
|
WebkitOverflowScrolling: 'touch',
|
||||||
|
|
||||||
|
// Note: Firefox not support `:has` yet
|
||||||
|
[`&:has(${componentCls}${antCls}-zoom-enter), &:has(${componentCls}${antCls}-zoom-appear)`]:
|
||||||
|
{
|
||||||
|
pointerEvents: 'none',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -120,14 +125,6 @@ const genModalStyle: GenerateStyle<ModalToken> = (token) => {
|
|||||||
// ======================== Root =========================
|
// ======================== Root =========================
|
||||||
{
|
{
|
||||||
[`${componentCls}-root`]: {
|
[`${componentCls}-root`]: {
|
||||||
[`${componentCls}-wrap`]: {
|
|
||||||
zIndex: token.zIndexPopupBase,
|
|
||||||
position: 'fixed',
|
|
||||||
inset: 0,
|
|
||||||
overflow: 'auto',
|
|
||||||
outline: 0,
|
|
||||||
WebkitOverflowScrolling: 'touch',
|
|
||||||
},
|
|
||||||
[`${componentCls}-wrap-rtl`]: {
|
[`${componentCls}-wrap-rtl`]: {
|
||||||
direction: 'rtl',
|
direction: 'rtl',
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user