Closed bonnieso closed 4 weeks ago
Hello @SAP/ui5-webcomponents-topic-rd,
this is regarding an issue involving multiple popups on a page with several ui5-webcomponents versions, following up on https://github.com/SAP/ui5-webcomponents/issues/6884. It appears there still might be some problems. Specifically, when closing the first dialog with the ESC key, the second one also closes unexpectedly.
Could you please investigate this?
Kind Regards, Dobrin
Hello @bonnieso ,
Please elaborate on which version is the second runtime? The fix needs to be part of all runtimes, in order to work. In fact, there seems to be only 1 runtime in the given sample, but maybe this is just a sample issue? Please update and retest.
Best regards, Petar
Hello, everyone! The issue has been inactive for 21 days. If there are still questions or comments, please feel free to continue the discussion. Inactive issues will be closed after 7 days!
Hello, everyone! The issue has been inactive for 28 days, so I am closing the issue.
Bug Description
Opening this new ticket since the this issue still persists.
Reference: https://github.com/SAP/ui5-webcomponents/issues/6884
Bug Description
When multiple dialogs or popovers are open on a given page, pressing the "escape" key closes all of the dialogs and popovers. This happens when different cores of ui5-webcomponents exist on a page and different cores control different dialogs and popovers. So when then "escape" key is pressed, this line https://github.com/SAP/ui5-webcomponents/blob/63986f557a78ac14674d2e618ed40967ed5a1102/packages/main/src/popup-utils/OpenedPopupsRegistry.ts#L48 executes for all of the open dialogs and popovers because the open components are being tracked by this variable https://github.com/SAP/ui5-webcomponents/blob/63986f557a78ac14674d2e618ed40967ed5a1102/packages/main/src/popup-utils/OpenedPopupsRegistry.ts#L9 and the dialogs loaded from different cores aren't aware of each other. In order to solve this issue, we are proposing to add a registry that is shared across different cores.
Affected Component
ui5-dialog
Expected Behaviour
On press of the "escape" key, only the component (ui5-dialog or ui5-popover) that is in focus closes.
Isolated Example
Go to https://codesandbox.io/p/sandbox/ui5-webcomponents-forked-c867m7
Steps to Reproduce
Log Output, Stack Trace or Screenshots
No response
Priority
Medium
UI5 Web Components Version
1.23.0
Browser
Chrome, Edge, Firefox, Safari
Operating System
No response
Additional Context
No response
Organization
SAP SuccessFactors
Declaration