Bootstrap 5: Modal keeps open after History Back and cannot be closed #36810
Unanswered
chriskrams
asked this question in
Q&A
Replies: 1 comment
|
Same problem with Bootstrap 4.0 and Rails 5.2.6. Did you find a solution @chriskrams ? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have discovered a strange behavior with modal windows and need help there.
Bootstrap: 5.1.3
Ruby: 2.5.7
Rails: 6.1.4
Browser: Edge / Brave / Chrome / Firefox
If I open a modal window in which a link to another page exists, follow the link and then go back via browser history back, the modal window remains open and cannot be closed.
I have another link which opens a new modal. That link works as normal. So I think JavaScript still works, but not the Bootstrap JavaScript I think.
It's quite possible that it's because of Ruby on Rails and not Bootstrap. It may also have to do with the bfcache. I have no idea how to solve the problem or track down the error.
All reactions