23
Views
0
Comments
The registerBackNavigationHandler stops working as expected after page reload or F5
Application Type
Reactive
Service Studio Version
11.54.27 (Build 62849)

The registerBackNavigationHandler stops working as expected after page reload or F5 is pressed


We have a screen that will show multiple webblocks, one at each time, like a wizard.

We want to be able to use the browser's back button to navigate backwards on the webblocks.

To implement this in each webblock we have two screen actions, one to move forward and other to move back.

In the OnReady of the webblock. we register the Back screen action using the CallbackId = $parameters.callBackId = $public.Navigation.registerBackNavigationHandler(function()({$actions.back_onClick()}); function.

In the OnDestroy of the webblock, we unregister the callback using $public.Navigation.unregisterBackNavigationHandler($parameters.callBackId).


Everything works as expected and I can move forward with the continue button and I can move back with the back screen button as well as with the browser's back button.

The problems happens after the user press F5 or there's a page reload.

After that I can no longer navigate back using the browsers back button, but the back navigation handlers are returning valids CallbackIds.


In the attachment i create a sample with this situation.

BackHandler.oap
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.