Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
fix(modal): modal-open body class lost when switching between modals #1327
This fixes #1325, preventing
This sets a new custom class
@@ Coverage Diff @@ ## dev #1327 +/- ## ========================================== - Coverage 42.69% 42.64% -0.05% ========================================== Files 130 130 Lines 2621 2624 +3 Branches 817 818 +1 ========================================== Hits 1119 1119 - Misses 1189 1192 +3 Partials 313 313
We'll need to test this out to ensure that the body padding and fixed/static/sticky element padding/margins are not doubled up when the new modal is opened.
It might be better to trigger a listen (
I'll make a few tweaks to your PR later today.
Just did a quick test using the following code:
<div> <b-btn v-b-modal.modal1>Launch demo modal</b-btn> <b-modal id="modal1" title=Modal #1"> <p class="my-4">Hello from modal!</p> <b-btn v-b-modal.modal2>Open second modal</b-btn> </b-modal> <b-modal id="modal2" title="Modal #2"> <p class="my-4">Hello from modal #2!</p> </b-modal> </div>
And it appears to work well. Note that there is a small delay of the new modal open as it waits for the first modal transition to end.
Could you test it out to make sure it works in your situation?