ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

[ResponsivePopover] Popover close event is called when menu inside the popover is closed

Open Vir-Mittal opened this issue 1 year ago • 2 comments

Bug Description

When you have a ResponsivePopover and a Menu component inside it, and you close the menu component, the "close" event of the ResponsivePopover is triggered.

Sandbox -

sandbox

Affected Component

ResponsivePopover

Expected Behaviour

The close event should not be triggered

Isolated Example

No response

Steps to Reproduce

  1. Open the responsive popover
  2. Open the menu inside it
  3. Close the menu by either clicking a menu item or clicking outside the menu ...

Log Output, Stack Trace or Screenshots

No response

Priority

High

UI5 Web Components Version

2.3.0

Browser

Chrome

Operating System

No response

Additional Context

No response

Organization

No response

Declaration

  • [X] I’m not disclosing any internal or sensitive information.

Vir-Mittal avatar Oct 16 '24 20:10 Vir-Mittal

Hi @Vir-Mittal , thank you for sharing your finding, and for the example that you have prepared. It seems that the problem is this code respPopover.addEventListener("close", () => { respPopover.open = false; }); Do you need to add it in this case? Thank you! Best regards, Petya Markova. (UI5 Web Components Dispatcher)

PetyaMarkovaBogdanova avatar Oct 17 '24 06:10 PetyaMarkovaBogdanova

Hi @PetyaMarkovaBogdanova @ilhan007 yes for our use case, we need to have that part of the code. But, the issue is that any code inside that callback will be executed even though that event should not have been emitted in the first place right? Only when the responsive popover is actually closed, should that callback be called. But in the sandbox case, it is being called even when a separate component (the menu) is closed

Vir-Mittal avatar Oct 21 '24 17:10 Vir-Mittal

Hi @PetyaMarkovaBogdanova @ilhan007 is there any update on this issue about when it is expected to be fixed? It is blocking us from upgrading to wc 2.0 and we will have to rollback to an old version if the fix will take time

Vir-Mittal avatar Oct 29 '24 18:10 Vir-Mittal

Will be soon resolved with this change https://github.com/SAP/ui5-webcomponents/pull/10133

and will be released with 2.5.0-rc.0 on Thursday

ilhan007 avatar Nov 04 '24 12:11 ilhan007

:tada: This issue has been resolved in version v2.4.1-rc.0 :tada:

The release is available on v2.4.1-rc.0

Your semantic-release bot :package::rocket:

ui5-webcomponents-bot avatar Nov 07 '24 08:11 ui5-webcomponents-bot