jquery-confirm
jquery-confirm copied to clipboard
Autoclose scrolls back to the top of page
jquery-confirm version: v3.x.x
I'm submitting a ... (check one with "x") [ x] bug report [ ] feature request [ ] support request
Current behavior: I have an autoclose confirm with to delete something and when the time ends it scrolls back to the top of the page.
Expected behavior: the confirm dialog would autoclose and stay where it currently is on the page not scrolling to top
Steps to reproduce:
Related code:
$("#mnuDeleteTask").click(function() {
$.confirm({
theme: 'material',
title: 'Delete Selected Task?',
content: 'Do you really wish to delete the selected task? Once you click \'Yes\' you cannot undo this action.',
type: 'red',
typeAnimated: true,
autoClose: 'close|10000',
buttons: {
DeleteTask: {
text: 'Delete Task',
btnClass: 'btn-red',
action: function(){
}
},
close: function () {
}
}
});
});
this is all i used to get the dialog to display as an autoclose.
Other information:
I added an alert to say that the action was cancelled on Close and it also scrolls to the top of the page when i click Ok... this is strange.
in the JS file i have set scrollToPreviousElement: false,
scrollToPreviousElementAnimate: false, and it is NOT scrolling to the top anymore.
in the JS file i have set scrollToPreviousElement: false,
scrollToPreviousElementAnimate: false, and it is NOT scrolling to the top anymore.
I have set that but still scrolls top on any button click and it even breaks the behavior. how to fix?