Bug Description
In SAP Analytics Cloud, we have many dialogs impemented with ui5-dialog. The issue is that on browser navigation, the dialog remains open over the new view, unlike their OpenUI5 counterparts (sap.m.Dialog) which close on hashchange.
Given that the ui5-dialog already recognizes the Esc-key as a dismissal signal and closes itself in response, there is more reason to expect that the dialog component should support closing on navigation as well as it indicates that the user is trying to leave the current view.
To work around this issue, every component implemented with ui5-dialog has to register a hashchange-listener for every open dialog and deregister it across every dismissal path which is not ideal.
Affected Component
ui5-dialog
Expected Behaviour
No response
Isolated Example
https://stackblitz.com/edit/js-abfqfaap?file=index.html
Steps to Reproduce
- Open the link above.
- Click "Open dialog" button
- Click "Navigate from inside the dialog" or click "Back" in the iframe (browser if you have the isolated example open).
Log Output, Stack Trace or Screenshots
No response
Priority
Medium
UI5 Web Components Version
1.24.28
Browser
Chrome
Operating System
Windows 11
Additional Context
One possible suggestion could be to add an optional boolean property to ui5-dialog like "close-on-navigation" for example. When "close-on-navigation" is true, the dialog starts the close lifecycle on browser navigation events.
<ui5-dialog close-on-navigation>...</ui5-dialog>
Organization
SAP Analytics Cloud
Declaration
Bug Description
In SAP Analytics Cloud, we have many dialogs impemented with
ui5-dialog. The issue is that on browser navigation, the dialog remains open over the new view, unlike their OpenUI5 counterparts (sap.m.Dialog) which close on hashchange.Given that the
ui5-dialogalready recognizes theEsc-key as a dismissal signal and closes itself in response, there is more reason to expect that the dialog component should support closing on navigation as well as it indicates that the user is trying to leave the current view.To work around this issue, every component implemented with
ui5-dialoghas to register a hashchange-listener for every open dialog and deregister it across every dismissal path which is not ideal.Affected Component
ui5-dialog
Expected Behaviour
No response
Isolated Example
https://stackblitz.com/edit/js-abfqfaap?file=index.html
Steps to Reproduce
Log Output, Stack Trace or Screenshots
No response
Priority
Medium
UI5 Web Components Version
1.24.28
Browser
Chrome
Operating System
Windows 11
Additional Context
One possible suggestion could be to add an optional boolean property to ui5-dialog like "close-on-navigation" for example. When "close-on-navigation" is true, the dialog starts the close lifecycle on browser navigation events.
Organization
SAP Analytics Cloud
Declaration