Hi, I have a modal dialog that is designed to block the user from going forward to the following page until the user read the info on the modal dialog and click on one of the 2 buttons (decline and accept) to either accept or decline in order for the modal to close. If the user decline, it closes the modal dialog and ends the session. If accept, the modal dialog will close and the user would be on the current page. All these things are working fine.
However, if the user clicks on the browser’s reload/refresh, the modal will disappear and the user will be on the current page, meaning the user can by pass this modal dialog to next page by clicking on the browser’s refresh button.
Since the browser’s refresh/reload button is something I cannot control, how can I keep this modal dialog remain open even if the user clicks on the browser’s refresh button?
I created 2 flags in the component. js page of this modal dialog to save the state of the user’s response on either button, and their default value is false. I then created an action to check these 2 flags and set the modal dialog to show if both of the flags is remain false. But I don’t know where to put this action so that it will keep do this check and keep the modal dialog open until the user responds, regardless how many times the user clicked on the browser’s refresh.
I have searched endless on Google, but none seems to have answer for the issue I am dealing with, so any help and inputs you can provide would be greatly appreciated. Thank you.