SchweizerischeBundesbahnen/scion-workbench

Activate view if it requires user confirmation before closing (CanClose guard)

danielwiehl opened this issue · 1 comments

If multiple views are closed at once (e.g., via ‘Close all tab’) and there are views that prevent closing, e.g., require user confirmation, then views that can be closed without confirmation should be closed immediately, and views that require confirmation should be activated first.

Currently, a view that prevents closing will not be activated, which is confusing for the user because the message box does not relate to the currently activated view.

No navigation can be performed while the promise of a canClose guard is pending, e.g., when opening a message box with view modality in the guard.