Dialog Re-open bug
jQuery-ui dialog widget sometimes has positioning issues when they are re-opened by the user after the user has dragged the dialog.
HTML
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.22/jquery-ui.min.js"></script>
<span class='ui-widget'>Dialog widget positioning test.</span>
<p>Automatically centers a dialog box to display helpful information.</p><br>
<span class='IEGBorder' onclick='$("#dialog").dialog("open");'> Click me </span>
<div id='dialog'><p>Drag this dialog and close it.
Then re-open it and the dialog will not be correctly centered on the page.</p>
</div>
CSS
body { margin:10px; padding:0px; border: 1px red solid; }
.IEGBorder { border: 1px black solid; }
JavaScript
$(document).ready(function() {
$('#dialog').dialog({
title: '>Drag handle.< ',
show: 'slide',
hide: 'explode',
autoOpen: false
});
});