/    Sign up×
Community /Pin to ProfileBookmark

Bootstrap Modal Window IE Issue

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: https://www.amazingdg.com/_dev/temp/
(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=”https://www.amazingdg.com/_dev/temp/images/modal-close-btn.svg” alt=”Close Demo Form”>
</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.

to post a comment
CSSJavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@apaspeckApr 20.2018 — [[2,52],[2,4,8]]
×

Success!

Help @jabbamonkey spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...