Closed rahulkr95 closed 6 years ago
Hi, this is a known issue. Unfortunately there's not a lot we can do to prevent this happening, as CRM handles the back button weirdly (it doesn't actually reload the page). Since the alert wrapper sits outside the form, it stays with the page if you navigate using back/forward. After leaving the page, the button events on the alert will not fire, but you should still be able to close the alert using the "X" in the corner of the alert. Sorry for any inconvenience, Paul
Thank you for the prompt reply.
I figured that was the reason but just wanted to verify it. Your solution is an excellent way to get custom modals and helps open up more avenues of user experience. Thank you.
I should be able to do a hide on click or change of history.hash or some sort. I'll work on that.
Hi Paul,
I am using AlertJs in the form pages based on certain label onClicks. It works perfectly on the page. It prevents user interaction on the page and forces users to use the custom buttons that have been set up to continue their actions. But recently out of chance I pressed the browser back button on the form page after the Modal loaded, the back action happened, it went to the previous page but failed to remove the modal.
Scenario -
Is this an expected behaviour or a bug ? Or is it part of some settings provided in the documentation?