ElemeFE / ElemeFE/element

[bug report] the dialog component mask layer is appended to the wrong element

Open
#21,345 1 comment 0 reactions 0 assignees View on GitHub
component: dialog type: bug
Dominant language
Vue
Stars
54k
Forks
14.4k
PR merge metrics
No merged PRs in 30d

Description

### Element UI version
2.15.6

### OS/Browsers version
Windows 10x64 / Chrome 93.0.4577.82

### Vue version
2.6.14

### Reproduction Link
https://codepen.io/boomvia/pen/KKqGOVY

### Steps to reproduce
1.同时显现Dialog1、Dialog2,其中Dialog1的modal-append-to-body为false
2.此时的遮罩层在body 元素下
3.关闭Dialog2后,Dialog1显示出来
4.此时的遮罩层仍然在body 元素下

### What is Expected?
1.Dialog2的遮罩层在body 元素下。
2.关闭Dialog2后,Dialog1的遮罩层应该在其父元素下,而不应该是body元素下。

### What is actually happening?
1.Dialog1的遮罩层与Dialog2的遮罩层都显示在了body元素下。
2.类似的场景:假如路由A打开了Dialog1,路由B打开了Dialog2。关闭Dialog2后,B的遮罩层不消失,A的遮罩层丢失。

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.