I'm working on nuxt.js project and want to ask a question. When I display modal using bootstrap's modal, does it stack the URL to the browser viewing history?
Here is the detail of the problem I currently have. I have two pages, which are page A and B.
- Page A has a button to link to page B, and I used $router.replace of programmatic navigation. So the history is not supposed to add.
- Page B has a button to show modal, and the modal has a modal close button, which literally closes the modal and back to page B.
The problem is, once I opened and closed the modal, I have to press the browser"s back button twice to back to page A. like, show modal on page B -> close modal on page B -> press browsers back button (but the URL doesn't changes and still stays on page B) -> press browsers back button again, and back to page A.
So I thought by showing a modal using bootstrap adds new history entry.
add this part later
here is a code for modal
// display modal
<button data-toggle="modal" data-target="#removeModal">show modal</button>
// dismiss modal
<div class="mdal fade" id="removeModal">
<p data-dismiss="modal">
<img src="@/assets/img/x-icon.png" alt="X-icon">
</p>
</div>