-
Notifications
You must be signed in to change notification settings - Fork 770
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
Crash after two viewed images #9
Comments
Hi. Can you show me your code? |
@zemat Do you still have the problem? |
Hi, I am also facing the same issue. When I see the the html using (inspect element) when it fails, Two remodal overlay elements are visible Also the base page content moves on popup, and moves back when closed. ameet |
@ameetshah Looks like you try to create it several times. If you want to create it, you don't need js, just set the 'remodal' class: <div class="remodal" data-remodal-id="modal">
...modal content...
</div> If you want to create it with js, remove 'remodal' class from the element and do this: <div data-remodal-id="modal">
...modal content...
</div> var inst = $('[data-remodal-id=modal]').remodal(options);
// open from js
inst.open(); If you want to find the instance of the created one and open it from js: var inst = $.remodal.lookup[$('[data-remodal-id=modal]').data('remodal')];
inst.open(); Are you sure you're doing everything right? |
I was using it the same way as I use JQUery Dialog, assuming that when we call close. the dialog/popup is no longer in the DOM. I changed the open code to following
This solved the issue. Though a suggestion, would it not be better, if we could just use standard open all the time ? .. Also the whole html background is moving to left when the popup opens, and comes back when it closes. I am using chrome. Thanks |
@ameetshah Background doesn't move, when modal opens, padding appears on the position of the scroll bar. |
Hi @vodkabears If you go here and click create new button, the popup comes, when you close it you see the background moving left. regards |
@ameetshah ok, it's a bit strange, because script calculates width of the scroll bar, but there is no scroll bar. I will look at this later. As a fast workaround set this css property of the body: |
Thank you Sir. It worked. Ameet On Thu, Apr 24, 2014 at 3:27 PM, Ilya notifications@github.com wrote:
|
@ameetshah Download new version, padding was fixed. https://github.com/VodkaBears/Remodal/releases/tag/0.1.5 |
Hi,
FYI, your plugin is crashing for me after I view more than two photos, error below:
TypeError: Cannot call method 'open' of undefined
The text was updated successfully, but these errors were encountered: