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

jc.close() doesn't listen to scrollToPreviousElement parameter #242

Closed
ballanz89 opened this issue Mar 21, 2017 · 5 comments
Closed

jc.close() doesn't listen to scrollToPreviousElement parameter #242

ballanz89 opened this issue Mar 21, 2017 · 5 comments
Labels

Comments

@ballanz89
Copy link

ballanz89 commented Mar 21, 2017

I have this piece of code:

               jc = $.dialog({                             
                    theme: 'supervan',                                
                    animation: 'top',                        
                    closeAnimation: 'bottom',                                
                    closeIcon: 'false',
                    scrollToPreviousElement: null,
                    scrollToPreviousElementAnimate: null,
                    closeIconClass: 'hidden',
                    title: 'My title',
                    content: 'My content',
                    onOpen: function(){
                        setTimeout(function() {
                            if (myFunction()) {
                               jc.close();
                                return false;
                            } 
                        }, 1000); 
                    },
                    onDestroy: function () {
                        $.confirm({                                
                            theme: 'supervan',
                            escapeKey: true,
                            animation: 'top',                        
                            closeAnimation: 'bottom',
                            scrollToPreviousElement: null,
                            scrollToPreviousElementAnimate: null,
                            backgroundDismiss: true,
                            title: 'My title',
                            content: "My content",
                            buttons: {
                                continua: function () {                                        
                                    return true;
                                }                                
                            }
                        }); 
                    },
               }); 

When I call the .close API it still scrolls to the top of the page.

@craftpip craftpip added the bug label Mar 22, 2017
@craftpip
Copy link
Owner

Looks like, it could not find the element, i will look into this

craftpip added a commit that referenced this issue Mar 29, 2017
@craftpip
Copy link
Owner

Fixed 👍

@ballanz89
Copy link
Author

Great! Thank you 👍 May I ask you when the new version will be available?

@craftpip
Copy link
Owner

Really soon, by today itself.

@craftpip
Copy link
Owner

Fixed in v3.2.0

@craftpip craftpip closed this as completed Apr 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants