Skip to content

[modal] I hope that when the mask is set to false, I can interact with the content behind the modal #5442

@candy-Tong

Description

@candy-Tong
  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

不想要 mask ,一般是希望对弹窗后的内容进行交互,希望组件能在内部处理这个问题

类似 issue:#1667

What does the proposed API look like?

无新增 API
这里提一个比较简单的方案:
可以通过给 ant-modal-wrap class 的元素(那个占满屏的元素)加 pointer-events: none;
让点击事件穿透到背后的内容,从而实现背后的交互。
如果有 mask,则点击事件会被 mask 挡住,不会传到 modal 背后的内容

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions