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

[Input]: [Input with SuggestionItem calls Dialog's onClose method on select] #10491

Open
1 task done
sebastian-kraemer opened this issue Jan 7, 2025 · 1 comment
Open
1 task done

Comments

@sebastian-kraemer
Copy link

Describe the bug

If I place an input inside a dialog with suggestion items, the dialog's onClose method is called when clicking on a suggestion item.

Isolated Example

https://stackblitz.com/edit/github-gx6sl754-gmjbty2g?file=src%2FApp.tsx

Reproduction steps

  1. Open dialog by clicking the button
  2. Focus input
  3. Type 'f'
  4. Select first suggestion item with the mouse
    ...

Expected Behaviour

The dialog's onClose method is not called.

Screenshots or Videos

No response

UI5 Web Components for React Version

2.5.0

UI5 Web Components Version

2.5.1

Browser

Chrome, Edge

Operating System

Windows

Additional Context

No response

Relevant log output

Organization

No response

Declaration

  • I’m not disclosing any internal or sensitive information.
@Lukas742
Copy link
Collaborator

Lukas742 commented Jan 8, 2025

Hi @sebastian-kraemer

the close (onClose) event of the Input is bubbling up to the Dialog. To prevent this you can call event.stopPropagation in the respective handler (example). I believe that there's an ongoing discussion regarding this behavior and since both components are web components, developed by the ui5-webcomponents team, I'll forward this issue to their repo.


Hi Colleagues,
please take over :)

@Lukas742 Lukas742 transferred this issue from SAP/ui5-webcomponents-react Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants