@@ -444,6 +444,7 @@ $.widget( "ui.dialog", {
444
444
containment : "document" ,
445
445
start : function ( event , ui ) {
446
446
$ ( this ) . addClass ( "ui-dialog-dragging" ) ;
447
+ that . _blockFrames ( ) ;
447
448
that . _trigger ( "dragStart" , event , filteredUi ( ui ) ) ;
448
449
} ,
449
450
drag : function ( event , ui ) {
@@ -455,6 +456,7 @@ $.widget( "ui.dialog", {
455
456
ui . position . top - that . document . scrollTop ( )
456
457
] ;
457
458
$ ( this ) . removeClass ( "ui-dialog-dragging" ) ;
459
+ that . _unblockFrames ( ) ;
458
460
that . _trigger ( "dragStop" , event , filteredUi ( ui ) ) ;
459
461
}
460
462
} ) ;
@@ -491,6 +493,7 @@ $.widget( "ui.dialog", {
491
493
handles : resizeHandles ,
492
494
start : function ( event , ui ) {
493
495
$ ( this ) . addClass ( "ui-dialog-resizing" ) ;
496
+ that . _blockFrames ( ) ;
494
497
that . _trigger ( "resizeStart" , event , filteredUi ( ui ) ) ;
495
498
} ,
496
499
resize : function ( event , ui ) {
@@ -500,6 +503,7 @@ $.widget( "ui.dialog", {
500
503
options . height = $ ( this ) . height ( ) ;
501
504
options . width = $ ( this ) . width ( ) ;
502
505
$ ( this ) . removeClass ( "ui-dialog-resizing" ) ;
506
+ that . _unblockFrames ( ) ;
503
507
that . _trigger ( "resizeStop" , event , filteredUi ( ui ) ) ;
504
508
}
505
509
} )
@@ -666,6 +670,28 @@ $.widget( "ui.dialog", {
666
670
}
667
671
} ,
668
672
673
+ _blockFrames : function ( ) {
674
+ this . iframeBlocks = this . document . find ( "iframe" ) . map ( function ( ) {
675
+ var iframe = $ ( this ) ;
676
+
677
+ return $ ( "<div>" )
678
+ . css ( {
679
+ position : "absolute" ,
680
+ width : iframe . outerWidth ( ) ,
681
+ height : iframe . outerHeight ( )
682
+ } )
683
+ . appendTo ( iframe . parent ( ) )
684
+ . offset ( iframe . offset ( ) ) [ 0 ] ;
685
+ } ) ;
686
+ } ,
687
+
688
+ _unblockFrames : function ( ) {
689
+ if ( this . iframeBlocks ) {
690
+ this . iframeBlocks . remove ( ) ;
691
+ delete this . iframeBlocks ;
692
+ }
693
+ } ,
694
+
669
695
_createOverlay : function ( ) {
670
696
if ( ! this . options . modal ) {
671
697
return ;
0 commit comments