Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Component] [drawer, message-box] 使用Drawer组件之后执行点击关闭Drawer按钮,无法点击MesageBox的Confirm或Cancel #17601

Closed
WenisOK opened this issue Jul 19, 2024 · 6 comments

Comments

@WenisOK
Copy link

WenisOK commented Jul 19, 2024

Bug Type: Component

Environment

  • Vue Version: 3.4.33
  • Element Plus Version: 2.7.6
  • Browser / OS: Chrome 126 / macOS 14.5
  • Build Tool: Nuxt

Reproduction

Related Component

  • el-drawer
  • el-message-box

Reproduction Link

Github Repo

Steps to reproduce

  1. 点击关闭drawer按钮。
  2. 弹出MessageBox以让用户点击Confirm或者Cancel。
  3. 执行后续Confirm或Cancel操作

What is Expected?

正常出现MesssageBox

What is actually happening?

  • Element-plus playground 并不会复现此故障
  • MessageBox被Drawer的Modal遮挡

Additional comments

(empty)

@btea
Copy link
Collaborator

btea commented Jul 20, 2024

Looks like a rendering timing issue, maybe you should make sure the dialog is rendered after the drawer.

@WenisOK
Copy link
Author

WenisOK commented Jul 20, 2024

Looks like a rendering timing issue, maybe you should make sure the dialog is rendered after the drawer.

I think so, but I have ensured that the drawer is rendered first by clicking the close button of the drawer or by clicking Modal.

@WenisOK
Copy link
Author

WenisOK commented Jul 20, 2024

It doesn't always have this bug, it occasionally does.

@btea
Copy link
Collaborator

btea commented Jul 21, 2024

You can set appendTo: document.querySelector('.el-overlay') in ElMessageBox.

@OVYVO
Copy link

OVYVO commented Aug 6, 2024

You can set appendTo: document.querySelector('.el-overlay') in ElMessageBox.

That's right, this is the correct solution

@WenisOK WenisOK closed this as completed Aug 10, 2024
Copy link

github-actions bot commented Sep 9, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

此 issue 已被自动锁定,因为关闭后没有任何近期活动。如果有相关 bug,请重新创建一个新 issue。

@github-actions github-actions bot locked and limited conversation to collaborators Sep 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants