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

Preview modal is not working fine if multiple widgets are there in different tabs #725

Closed
msinghai opened this issue Jul 27, 2016 · 3 comments

Comments

@msinghai
Copy link

Hello Kartik,

I have been using this plugin and its really great work. I am facing one issue. I am putting the steps to reproduce it.

  • In a form have two tabs( I have used bootstrap tabs)
  • In each tab have an input widget field.
  • In the first tab, if you select an image and zoom it it works perfect
  • Now select an image for the second tab input widget and click on zoom. It would show just overlay.
  • The image is there but in the first tab thus using firebug, if i adjust the css and go to first tab, i would be able to see the image in the modal window.

Could you please tell me how this could be resolved?

Regards,
Mayank

@kartik-v
Copy link
Owner

kartik-v commented Aug 2, 2016

This is more to do with BS Modal behavior and styling... that you need to handle it in your code. You can try $('.modal').appendTo('body'); after you click each tab.

@kartik-v kartik-v closed this as completed Aug 2, 2016
@Kiblyn11
Copy link

Got the same issue and I found out what happens.
The plugin create one modal next to the first plugin field in DOM.
But when displaying other tab and trying to display, this modal is hidden under the other tab, which is display:none.

I suggest to append the modal to the body instead of the parent, what do you think ? I get it working that way :

in _initZoom

$dialog = $(document.createElement('div')).html(modalMain).appendTo('body');

instead of

$dialog = $(document.createElement('div')).html(modalMain).insertAfter(self.$container);

@kartik-v
Copy link
Owner

kartik-v commented Jan 31, 2017

The problem with above approach is body tag is optional and may not exist in all layouts.

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

3 participants