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

Insert image and Insert link modals closing all modals #1512

Closed
chopstik opened this issue Dec 17, 2015 · 8 comments
Closed

Insert image and Insert link modals closing all modals #1512

chopstik opened this issue Dec 17, 2015 · 8 comments

Comments

@chopstik
Copy link

I launch Summernote in a Bootbox modal, the Insert image and Insert link buttons fire their own modal on top. If you then add an image URL or a Link as you click 'Insert' self.$dialog.modal('hide'); on line 5772 is closing both the top and bottom modals when it should only be closing the top most modal leaving the summernote container still visible and containing the new image or link. Any thoughts on how that might be fixed?

@hardikvaishnav
Copy link

Hello,

I think you have to set below option. That might be solve your problem.

dialogsInBody: true,

Ex.
('#HtmlContent').summernote( {
dialogsInBody: true,
});

Thanks,
Hardik

@chopstik
Copy link
Author

Tried that, and it didn't solve it. The dialog's aren't in the body. I'll try it again to be sure and thanks for the comment.

@gioloi
Copy link

gioloi commented Dec 18, 2015

+1

@chopstik
Copy link
Author

If I 'Select Files' instead of entering an Image URL, that process works 100% OK - the local image file is selected, the Image modal closes and leaves the Summernote container in the first modal still open and the image has been inserted in the editor as expected. It's only as you enter an Image URL (or Link URL) that both modals close when you click the 'Insert' button.

@chopstik
Copy link
Author

Any thoughts/ideas for the developers?

@MadeInMoon
Copy link

@hardikvaishnav
It worked for me! Thank U!

@chopstik
Copy link
Author

I take it all back, I've re-tested and tried the following options on initialisation and the Insert Image and Insert URL dialog's do return their content to the summernote editable area in the already open dialog that called the inserts:

dialogsInBody: true,
dialogsFade: false,

@GerardoTorossi
Copy link

It didn't work for me, but adding this css line solved it :
.modal-dialog { z-index: 1040; }

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

No branches or pull requests

4 participants