In this case, the modal is still open when we navigate and closing the modal is animated so if we close it, the modal div will still technically be on the screen for a second or two afterwards...
There a few other similar examples of this in the code as well in the quote code...
See card: [alpine_mobile/#6117] RayGun t.GetDirtyProperties is not a function
Expected Result
Should not throw error
Actual Result
page locks after clicking close and you have reload page
Analysis
Not sure what’s going on here but my theory is that the Disposable() module is biting us again. I think it’s tearing down all of the objects/properties of the Form and something is calling isDirty.
If you return false from page/module that opened to modal, it will effectively block the back button. The problem is there are MANY modules that open modals. We would have to get references to EVERY modal (maybe only the ones based on Form?) and prevent deactivation if it’s open.
FOR NOW: simply block navigation when a true Modal is open. Note that we hack the appearance of Modals for a few screens:
The following are faux modal forms and the Back button will NOT be blocked on these forms:
After applying the Pr, I was able to verify the following:
The message “t.GetDirtyProperties is not a function” is no longer thrown when a user clicks the ‘X’ button after clicking the Back button multiple times.
The page no longer locks after clicking the ‘Close(X)’ button.
Performed a smoke test on mobile and verified that all the functionalities still work as expected.
Verified that selenium passed
!clip-5a11-583e.png!{width: 1000px;}
Mingle Card: 6120 This PR was reverted
https://github.com/Liquidframeworks/alpine-mobile/commit/6a5e8f8dda03a8fd6ff2ace05a371e99391a3c72
It because we do some weird navigation from Modals in a few circumstances. E.g.
In this case, the modal is still open when we navigate and closing the modal is animated so if we close it, the modal div will still technically be on the screen for a second or two afterwards...
There a few other similar examples of this in the code as well in the quote code...
Steps to Reproduce
Expected Result
Should not throw error
Actual Result
page locks after clicking close and you have reload page
Analysis
Not sure what’s going on here but my theory is that the Disposable() module is biting us again. I think it’s tearing down all of the objects/properties of the Form and something is calling isDirty.
If you return false from page/module that opened to modal, it will effectively block the back button. The problem is there are MANY modules that open modals. We would have to get references to EVERY modal (maybe only the ones based on Form?) and prevent deactivation if it’s open.
FOR NOW: simply block navigation when a true Modal is open. Note that we hack the appearance of Modals for a few screens:
The following are faux modal forms and the Back button will NOT be blocked on these forms:
Related Cards
[alpine_mobile/#6122] close opened modal on back button pressed
[alpine_mobile/#6117] RayGun t.GetDirtyProperties is not a function
Impact Analysis
Developers: Fill in this area during code review.
Test Plan
Click through Mobile opening modals (the screen takes up the whole screen with an “X” in the top right corner) and:
QA Test Analysis:
https://lfw.testrail.io/index.php?/cases/view/18346
Test Note: I was able to reproduce this defect on the ticket item level by following the steps above:
!clip-d45c-5bc2.png!{height: 605px; width: 1000px;}
After applying the Pr, I was able to verify the following:
!clip-5a11-583e.png!{width: 1000px;}