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

Can't Create Links in Editor in a Modal jQuery UI Dialog Box #1098

Closed
Bitcosoftware opened this issue Apr 17, 2020 · 5 comments
Closed

Can't Create Links in Editor in a Modal jQuery UI Dialog Box #1098

Bitcosoftware opened this issue Apr 17, 2020 · 5 comments
Labels
bug:ui Bug in UI (trumbowyg.scss)
Milestone

Comments

@Bitcosoftware
Copy link

When I imbed the editor inside a jQuery UI Modal Dialog Box, I can't add or modify a link. The dialog for a new link will open, when I try to type it will edit the text of the control and not the dialog box for the link.

Description

I am using Google Chrome.

How to reproduce?

I have create a jsfiddle to reproduce the issue here:

https://jsfiddle.net/Bitcosoftware/k1d3g0f2/14/

Just click on the button to open the Dialog Box. Select some text to create a Hyperlink and click on the Link button. You can't edit the text box.

@Alex-D
Copy link
Owner

Alex-D commented Apr 30, 2020

Can't find why the input can't take the focus, the issue does not seem to come from Trumbowyg, but from the combo. Maybe the issue comes from the fact that Trumbowyg open modals at the bottom at the body, so they are not in the jQuery UI Modal.

I will think about that for the v3 (see #875)

@Alex-D Alex-D closed this as completed Apr 30, 2020
@Alex-D Alex-D added the bug:ui Bug in UI (trumbowyg.scss) label Apr 30, 2020
@Alex-D Alex-D added this to the v3.0 milestone Apr 30, 2020
@magarrent
Copy link

How did you fix this? I'm using 3.6.0 and still have this error

@feeela
Copy link

feeela commented Apr 14, 2022

@Alex-D Why did you close this issue? It is still open in the current versions.
Did you find any solution to this? Or at least a practical workaround?

@magarrent There is no 3.x Version. How could you use it?

@magarrent
Copy link

@Alex-D Why did you close this issue? It is still open in the current versions. Did you find any solution to this? Or at least a practical workaround?

@magarrent There is no 3.x Version. How could you use it?

Hey @feeela, honestly I don't remember, but maybe I changed the editor for another, ckeditor or something

@PatrickAtM4
Copy link

Two possible fixes for this (its jquery dialog preventing you from clicking into the inputs when the modal is outside of the dialog with jquery dialog in modal mode):

Don't run jquery dialog in modal, add this to .dialog(

modal: false

That can cause other issues depending on what you're doing (it did for me) so I used the more brute force solution,which is to move the trumbowyg modal into jquery dialog like so when trumbowyg-modal is opened. Not sure this is the best/prettiest solution but it works for me:

.on('tbwmodalopen', function(){
                $(".trumbowyg-modal").detach().appendTo(".ui-dialog");
            });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:ui Bug in UI (trumbowyg.scss)
Projects
None yet
Development

No branches or pull requests

5 participants