refactor(ui5-popup): Events do not bubble #1981
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Preface: Some events should not bubble, because that leads to strange side effects (f.e. if there are nested popups and the inner one fires an event, the handlers of the outer one will be executed too, unless the user cancels the event or checks the event target).
UI5Element.js
now supports non-bubbling events (a new parameter added tofireEvent
).All 4 events of
Popup.js
were tweaked:before-open
open
from executing)after-open
before-close
after-close
closes: #1962
BREAKING CHANGE: If you relied on
before-open
,before-close
,after-open
orafter-close
bubbling and registered event listeners on a parent element, you must register these event listeners on the popup (popover, dialog etc...) instances directly.