I have a modal window (using bootstrap), with a close button. The modal window opens and closes fine in most browsers. However, in internet explorer, there is a problem. We can open the modal window fine, and close it fine … but if we try to open it again, it wont.
When I click the open button a second time, there is an error in IE’s console … Object.keys: argument is not an Object. Note: this error doesn’t occur the first time opening the modal window. Not sure how to fix it…
You can view the page here:
(click the GET THE DEMO link in the top right, in Internet Explorer)
Most of the javascript functionality is in bootstrap. Below is the html for the open button [I believe data-toggle=”modal” and data-target=”#exampleModal” are the key to opening the window]…
<a href=”javascript:void(0)” id=”navdemo” data-toggle=”modal” data-target=”#exampleModal”>Get The Demo</a>
…and the html for the start of the modal window, with the close button [note the id=”exampleModal” tells which window to open. And the data-dismiss tells to close “modal”…
<div class=”modal fade show” id=”exampleModal” tabindex=”-1″ role=”dialog” aria-labelledby=”exampleModalLabel” style=”padding-right: 17px; display: block;”>
<div class=”modal-dialog modal-dialog-centered” role=”document”>
<div class=”modal-content”>
<!– CLOSE BUTTON –>
<div class=”row at-modal-close-box”>
<a href=”#” data-dismiss=”modal” aria-label=”Close”>
<img src=”
</a>
</div>
…
I tried to remove the “fade” class from the modal, when in IE (because fade is not used in IE), but that didn’t work.