Hi everyone,
I’m working on a feature where the user fills in a form. If there are unsaved changes, I want to:
-
Show a warning dialog when the user tries to:
-
Close the browser tab/window
-
Refresh the page
-
Navigate to a different page (e.g., go to home)
-
The dialog should show options like:
-
Save & Leave
-
Leave Without Saving
-
Cancel
I know that browser beforeunload dialogs are very limited and don’t allow custom UI, so I’m not sure how to approach this properly.
In alpha Do we have custom function for this?