Ticket #4797: 4797_3.patch
File 4797_3.patch, 1.7 KB (added by , 13 years ago) |
---|
-
_source/plugins/dialog/plugin.js
542 542 543 543 CKEDITOR.dialog.prototype = 544 544 { 545 destroy : function() 546 { 547 this._.element.remove(); 548 }, 549 545 550 /** 546 551 * Resizes the dialog. 547 552 * @param {Number} width The width of the dialog in pixels. … … 658 663 if ( !( element.getParent() && element.getParent().equals( CKEDITOR.document.getBody() ) ) ) 659 664 element.appendTo( CKEDITOR.document.getBody() ); 660 665 else 661 return;666 element.setStyle( 'display', 'block' ); 662 667 663 668 // FIREFOX BUG: Fix vanishing caret for Firefox 2 or Gecko 1.8. 664 669 if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 ) … … 798 803 { 799 804 this.fire( 'hide', {} ); 800 805 this._.editor.fire( 'dialogHide', this ); 801 802 // Remove the dialog's element from the root document.803 806 var element = this._.element; 804 if ( !element.getParent() ) 805 return; 806 807 element.remove(); 807 element.setStyle( 'display', 'none' ); 808 808 this.parts.dialog.setStyle( 'visibility', 'hidden' ); 809 810 809 // Unregister all access keys associated with this dialog. 811 810 unregisterAccessKey( this ); 812 811 … … 2779 2778 } 2780 2779 }; 2781 2780 })(); 2781 2782 CKEDITOR.on( 'instanceDestroyed', function( evt ) 2783 { 2784 var dialogs = evt.editor._.storedDialogs; 2785 for ( var name in dialogs ) 2786 dialogs[ name ].destroy(); 2787 2788 // Remove dialog cover on last instance destroy. 2789 if ( CKEDITOR.tools.isEmpty( CKEDITOR.instances ) ); 2790 coverElement.remove(); 2791 }); 2792 2782 2793 })(); 2783 2794 2784 2795 // Extend the CKEDITOR.editor class with dialog specific functions.