I have the following jqueryui dialog:
$("#dialog").dialog({
bgiframe: true,
autoOpen: false,
height: 420,
hide: 'slide',
modal: true,
buttons: {
'Annuler': function() {
$(this).dialog('close');
},
'Envoyer votre message': function() {}
}
When I show it with:
$('#question-annonceur').click(function() {
$('#dialog').dialog('open');
});
This is pretty focused. But when I scroll vertically, it is no longer focused. In fact, the dialog is still concentrated (relative to the position of the scroll bar set by the user), but the scroll bar was scrolled to the top of the window, and then the dialog was no longer centered (since it was centered relative to the new scroll position).
Is there a property that I can set so that the scrollbar is not reset at the top like this?
Thank.
source
share