I have a question about how browser history is updated when using the navigation action node to set URL parameters in Appfarm.
Setup:
I have a button that opens a full-screen dialog and uses Navigate to set URL parameters. When I use Navigate without setting View, the new URL replaces the old one in the browser history (see screenshot).
Issue:
When using the browser back button after opening the dialog and setting the URL parameter, it navigates back what seems like two steps (see example in Loom). For some users this feels a bit confusing.
Is there a workaround for this?
Or is it possible to have the new URL added to the browser history instead of replacing the current one when only URL parameters are set?
When you use the Navigate action node without setting a View, it replaces the current URL in the browser history instead of adding a new entry. This is why when users click the browser back button, it appears to go back two steps - it’s actually going back to the URL that existed before the replacement occurred.
Instead of using Navigate without a View, explicitly set the current View along with your URL parameters:
In your Navigate action node, set the View property explicitly to the current view
Set your URL parameters as usual
Set Keep existing URL Parameters to true if you want to preserve other parameters
This will add a new entry to the browser history instead of replacing the current one.
The situation is: I have a full-screen dialog that I open from different tables in my app. For a lot of users it looks like they navigated to a new view, but they’ve really just opened a dialog on top of the current view. I have a back button in the dialog that closes it, but many users use the built-in back button in the browser instead.
Any ideas on how I can make the browser back button close the dialog and keep them on the current view?
I was thinking of doing a workaround with On view load, but it doesn’t seem like that action is triggered when the browser back button only clears the URL params: my.app/home?param=123 → my.app/home= On view load not triggered
I see. Full-screen dialogs can be fine, as long as it’s clear to users that they have now opened a dialog and not navigated to a new view (and hence expecting to be able to use the browser back button).
You can try to see if the On Browser History Change event handler might help you achieve what you are looking to do.