Dialog: Update position when size is changed. Fixes #8789 - Dialog does not close for first click on chrome.

This commit is contained in:
Kris Borchers 2012-11-24 23:18:51 -06:00 committed by Jörn Zaefferer
parent ec1f1bde76
commit d179cbaf32
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,6 @@
$(function() { $(function() {
var dialog = $( "#dialog" ).dialog({ var dialog = $( "#dialog" ).dialog({
modal: true, modal: true,
height: 350,
width: 500, width: 500,
buttons: [ buttons: [
{ {
@ -45,7 +44,7 @@
showText: false showText: false
} }
] ]
}), }).dialog("option", "height", 600),
datepickerDialog = $( "#dialog-datepicker" ).dialog({ datepickerDialog = $( "#dialog-datepicker" ).dialog({
autoOpen: false, autoOpen: false,

View File

@ -527,6 +527,7 @@ $.widget("ui.dialog", {
if ( resize ) { if ( resize ) {
this._size(); this._size();
this._position();
} }
if ( this.uiDialog.is( ":data(ui-resizable)" ) ) { if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
this.uiDialog.resizable( "option", resizableOptions ); this.uiDialog.resizable( "option", resizableOptions );