Skip to content

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

Closed
@ballanz89

Description

@ballanz89

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions