Hi,
Is there any method to detect whether a model sheet is already open or not on a page?
Here is the scenario:-
I have a page with a button and when the button is clicked it opens a ModalSheet.
Once the model sheet is opened, on the Model sheet itself, I have a back button to close the modal sheet.
To close this modal sheet, the user is supposed to click the back button available on the model sheet and go back to the original screen that he was viewing before opening the Modal Sheet.
Unfortunately, some users are clicking on the browser's back button. Doing so will take the user to the previous page. This is not what I need. If the user clicks on the browser's back button, the app should be able to detect whether the model sheet is already open or not, if the modal sheet is already open then it should close the already open modal sheet and then remain on the same page.
Any hints will be appreciated.
Is there any method to detect whether a model sheet is already open or not on a page?
Here is the scenario:-
I have a page with a button and when the button is clicked it opens a ModalSheet.
Once the model sheet is opened, on the Model sheet itself, I have a back button to close the modal sheet.
To close this modal sheet, the user is supposed to click the back button available on the model sheet and go back to the original screen that he was viewing before opening the Modal Sheet.
Unfortunately, some users are clicking on the browser's back button. Doing so will take the user to the previous page. This is not what I need. If the user clicks on the browser's back button, the app should be able to detect whether the model sheet is already open or not, if the modal sheet is already open then it should close the already open modal sheet and then remain on the same page.
Any hints will be appreciated.