Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
Vir-Mittal opened this issue Oct 16, 2024 · 3 comments
Open
1 task done
Assignees
Labels
bug This issue is a bug in the code SAP SF

Comments

@Vir-Mittal
Copy link

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

  • I’m not disclosing any internal or sensitive information.
@Vir-Mittal Vir-Mittal added the bug This issue is a bug in the code label Oct 16, 2024
@PetyaMarkovaBogdanova PetyaMarkovaBogdanova self-assigned this Oct 17, 2024
@PetyaMarkovaBogdanova
Copy link
Contributor

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)

@Vir-Mittal
Copy link
Author

Vir-Mittal commented Oct 21, 2024

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug in the code SAP SF
Projects
None yet
Development

No branches or pull requests

5 participants