craftpip / jquery-confirm

A multipurpose plugin for alert, confirm & dialog, with extended features.

Home Page:http://craftpip.github.io/jquery-confirm/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

ballanz89 opened this issue · comments

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.

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

Fixed 👍

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

Really soon, by today itself.

Fixed in v3.2.0