-
Notifications
You must be signed in to change notification settings - Fork 273
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
Popover: afterClose event bubbling up to parents? #1962
Comments
Hey Steve, I'll forward this issue to the Web Components team, I think they'll look into it. |
Both issues can be reproduced with the master version: (1) The afterClose event fired from the popover (inside a dialog) bubbles to the dialog, and the handler (bound to afterClose) of the dialog is called although the dialog itself is not closing. (2) The Popover placement is wrong when opened within a dialog. For the second there is an issue already: |
Hello @stsander07 @MarcusNotheis (1) the (2) this is how CSS works and is widely considered a shortcoming of the spec - |
hi @vladitasev , Sorry, I'm a little confused. Are you saying this issue is fixed in rc.8 as Marcus thought? Or this is something the developers should handle? |
Hi @stsander07 , Sorry for the confusion. To clarify: yes, we expect applications/third-party libraries to handle this issue. @stsander07 @MarcusNotheis Marcus, do you have anything against this approach, or any other considerations? |
Hey @vladitasev, I have some mixed feelings here to be honest. I see that the event-bubbling is something that is very specific to HTML/JavaScript and should be taken care of by the developers (and I totally see why you don't want to work around the standard here :) ). Anyhow, I think that this is something that might easily lead to unexpected closing behaviours in applications, so I would at least add it to the documentation to make it very clear to the developers that they should take care of this handling. If there would be something like a Regarding the Best regards, |
Hi @MarcusNotheis @stsander07 We had an internal discussion about this today, and we've decided to try out a new thing: namely, mark some events as "non-bubbling" in the metadata, and respectively, fire them with We realize this could be a breaking change for some apps - for example if the app attached an event handler for "afterClose" on the body for all dialogs, this would stop working. At the same time, we see how this bubbling behavior might be considered unintentional most of the time, and people would be badly surprised more often than not. We are going to create a PR for this sometime this week and link it here. Regards, |
Describe the bug
Doing any sorting on an AnalyticalTable component within a Dialog that has an onAfterClose callback passed through (which actually closes the dialog) will cause the dialog to close.
Isolated Example
https://codesandbox.io/s/wispy-dew-qlcu7
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The dialog should not close
Screenshots
UI5 Web Components for React Information
@ui5/webcomponents
version: 1.0.0rc-7@ui5/webcomponents-react
version: 0.9.11Operating System: Windows
Browser: Edge (Chromium)
Additional context
The text was updated successfully, but these errors were encountered: