Closed ybesnehard closed 11 months ago
Hello @SAP/ui5-webcomponents-topic-b ,
The issue is reproducible with the sample provided. afterClose event bubbles for the Menu components.
Kind Regards, Elena
The issue is still happing with SelectMenu :( https://codesandbox.io/s/ui5-webcomponents-forked-ykvz69?file=/index.html
The issue is still happing with SelectMenu :( https://codesandbox.io/s/ui5-webcomponents-forked-ykvz69?file=/index.html
@ybesnehard the SelectMenu and Menu sound similar but they are completely different components. We will fix the issue in the SelectMenu, thanks for reporting.
Bug Description
When you are creating a Dialog with a Menu inside it. The afterClose event of the Menu's Popup is also fired on the containing Dialog. It should not be the case.
In our product (SAP Build Process Automation) specific usecase we remove the dialog from the DOM on afterClose event when dialog are dynamically added in the DOM at opening. So on the afterClose of the Menu that is opened in the dialog, the dialog itself is destroyed from the DOM.
This of course could be a more generic event bubbling issue that create this
Affected Component
Eventing / Dialog / Menu
Expected Behaviour
afterClose event should not bubble from the Menu to its Dialog container
Isolated Example
https://codesandbox.io/s/ui5-webcomponents-forked-plkf4s?file=/src/index.js
Steps to Reproduce
Log Output, Stack Trace or Screenshots
No response
Priority
High
UI5 Web Components Version
1.17.2
Browser
Chrome
Operating System
Windows
Additional Context
No response
Organization
SAP
Declaration