Closed zhangliangyi closed 1 year ago
Hello @zhangliangyi ,
Can you please provide a test system, where we could test or an isolated sample in order to debug the issue?
Thanks in advance!
Kind Regards, Elena
I will prepare some testable example for this issue.
Hi @zhangliangyi,
I'm closing the incident since it seems to be the same with: #6884 and there is more information about the issue. Also there is reproducible example so no need to prepare one.
Regards, Nayden
That's great. Thanks @nnaydenow .
Bug Description
We have developed some widgets. The widgets have their separated bundle which contains
ui5-webcomponents
andreact
libraries. In some cases we need to reuse these widgets in different pages.Let's imagine the following case: We open a
ui5-dialog
calledDialogA
in a page, and in the opened DialogA we need to import a widget described above. After the widget bundle loaded, we will have two UI5 contexts which are not accessible to each other.Then when we open another
ui5-dialog
calledDialogB
from widget bundle and press ESC key, the keypress action will close both DialogA and DialogB.The main reason of this behavior may be the popup registry is not shared across different UI5 context which is not like the processing of
z-index
.And as a result of this, the event listener would be added to document for multiple times. https://github.com/SAP/ui5-webcomponents/blob/d37b319eb6f9b6ca27bd08a8a389595424f69f6e/packages/main/src/popup-utils/OpenedPopupsRegistry.ts#L22
Affected Component
ui5-dialog, ui5-popover
Expected Behaviour
The popup registry should be shared across multiple UI5 and OpenUI5 context, then the unexpected closure can be avoided.
Isolated Example
No response
Steps to Reproduce
1. 2. 3. ...
Log Output, Stack Trace or Screenshots
No response
Priority
Medium
UI5 Web Components Version
1.10.4
Browser
Edge
Operating System
No response
Additional Context
No response
Declaration