Modal - Unable to scroll page after closing during a vue-router guard
See original GitHub issueWhen using a Modal as an ‘Are you sure?’ type dialog during a navigation change, it prevents the user from being able to scroll the page after they reach the requested page.
I detect the route changing using vue-router’s beforeNavigationLeave
method. Using the reference to the modal, I call the show()
method on it to display to the user, and set the next()
function of vue-router to a local variable in the component. Then, once the user clicks the OK method on the modal, this method is called to continue the navigation. After they land on the requested page, they’re unable to scroll. It is also not possible to scroll regardless of route until the user reloads the page in their browser.
I’ve prepared a test case here.
Operating System: Mac OS X 10.14.3 Browser: Google Chrome 72.0.3626.109 Bootstrap Vue: Version 2.0.0-rc.14
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:12 (8 by maintainers)
Top GitHub Comments
It is possible…
Will look into this
Excellent.