Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to open a new remote content in a modal window. #14238

Closed
thiagotalma opened this issue Jul 25, 2014 · 4 comments
Closed

Error when trying to open a new remote content in a modal window. #14238

thiagotalma opened this issue Jul 25, 2014 · 4 comments

Comments

@thiagotalma
Copy link

When a modal window is open and a link within your content points to a remote page within the same modal, an error occurs:

Uncaught TypeError: undefined is not a function bootstrap.js:868
Modal.hide bootstrap.js:868
Modal.toggle bootstrap.js:817
(anonymous function) bootstrap.js:983
jQuery.extend.each jquery.js:611
jQuery.fn.jQuery.each jquery.js:241
$.fn.modal bootstrap.js:977
(anonymous function) bootstrap.js:1012
jQuery.event.dispatch jquery.js:3063
jQuery.event.add.elemData.handle.eventHandle jquery.js:2681

Test: http://plnkr.co/llRUSYXKziaaV1WvXnrJ

@cvrebert
Copy link
Collaborator

Register your .removeData('bs.modal') callback on the shown.bs.modal event instead of the hidden.bs.modal event. Seems to fix things FWICT.

Remote modals are now deprecated per #14034, so it's not worth our time to try to address this edge case. Closing as WontFix. Sorry man.

@thiagotalma
Copy link
Author

@cvrebert Thank you for your attention.

I have another question for you, take this opportunity to ask you before opening another issue.

It's an option you do not check if there is already a 'modal-backdrop' before creating a new one?

As it is not guaranteed to be a single element and multiple elements can be created.

@cvrebert
Copy link
Collaborator

With the current version of modals, I don't recall any reports of multiple backdrops being created when using modals correctly.
Note that showing multiple modals simultaneously is explicitly not a supported use of the modals plugin.

@thiagotalma
Copy link
Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants