diff --git a/js/jquery-confirm.js b/js/jquery-confirm.js index 9509ecf..6e5ce97 100644 --- a/js/jquery-confirm.js +++ b/js/jquery-confirm.js @@ -547,9 +547,12 @@ if(that.smoothContent){ var contentHeight = that.$content.outerHeight() || 0; if(contentHeight !== prevContentHeight){ - that.$contentPane.css({ - 'height': contentHeight - }).scrollTop(0); + + // Commented out to prevent scroll to top when updating the content + // (for example when using ajax in forms in content) + // that.$contentPane.css({ + // 'height': contentHeight + // }).scrollTop(0); prevContentHeight = contentHeight; } var wh = $(window).height(); @@ -1369,4 +1372,4 @@ $(document).on('mousedown', 'button, a', function(){ jconfirm.lastClicked = $(this); }); -})); \ No newline at end of file +}));