You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A onBeforeClose or onBeforeUnload = (event, instance) would be useful especially when notifying the user that the changes that have not been saved will not be applied
Overlays (Window, Dropdown, ...) call overlayWillDismiss(instance, component) before they close, e.g. with Escape or the close button. Return false to keep the overlay open, e.g. after asking whether unsaved changes should be discarded.
Follow-up: since #1371 and #1372, overlays also support onBeforeDismiss, which is the more natural option for this. It is called before the overlay is dismissed, e.g. with Escape, the close button, a focus out with dismissOnFocusOut, the back button with dismissOnPopState, or the function returned by open(). Return false, or a promise that resolves to false, to keep the overlay open:
While the promise is pending, other attempts to dismiss the overlay are ignored, so the question is asked only once. onBeforeDismiss can also name a controller method, e.g. onBeforeDismiss="onBeforeDismiss". Setting visible to false in the store closes the overlay without calling it, so a Save button can close the window directly.
Available from the next release; in earlier versions, use overlayWillDismiss as described above (synchronous only).
Activity
mstijak commentedon Nov 24, 2026
Overlays (
Window,Dropdown, ...) calloverlayWillDismiss(instance, component)before they close, e.g. with Escape or the close button. Returnfalseto keep the overlay open, e.g. after asking whether unsaved changes should be discarded.mstijak commentedon Nov 24, 2026
Follow-up: since #1371 and #1372, overlays also support
onBeforeDismiss, which is the more natural option for this. It is called before the overlay is dismissed, e.g. with Escape, the close button, a focus out withdismissOnFocusOut, the back button withdismissOnPopState, or the function returned byopen(). Returnfalse, or a promise that resolves tofalse, to keep the overlay open:While the promise is pending, other attempts to dismiss the overlay are ignored, so the question is asked only once.
onBeforeDismisscan also name a controller method, e.g.onBeforeDismiss="onBeforeDismiss". Settingvisibletofalsein the store closes the overlay without calling it, so a Save button can close the window directly.Available from the next release; in earlier versions, use
overlayWillDismissas described above (synchronous only).