X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fdialog%2Fplugin.js;h=68494616cb9bb2f7cc2d7282ff62845dc6b6fc90;hp=b5aab8182c2060c5e27b7863ba76f6b848dce35b;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hpb=9afde8772159bd3436f1f5b7862960307710ae5a diff --git a/_source/plugins/dialog/plugin.js b/_source/plugins/dialog/plugin.js index b5aab81..6849461 100644 --- a/_source/plugins/dialog/plugin.js +++ b/_source/plugins/dialog/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -710,13 +710,6 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3; */ show : function() { - var editor = this._.editor; - if ( editor.mode == 'wysiwyg' && CKEDITOR.env.ie ) - { - var selection = editor.getSelection(); - selection && selection.lock(); - } - // Insert the dialog's element to the root document. var element = this._.element; var definition = this.definition; @@ -1706,7 +1699,9 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3; return; var editor = dialog.getParentEditor(); - var wrapperWidth, wrapperHeight, viewSize, origin, startSize; + var wrapperWidth, wrapperHeight, + viewSize, origin, startSize, + dialogCover; function positionDialog( right ) { @@ -1725,6 +1720,16 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3; { startSize = dialog.getSize(); + var content = dialog.parts.contents, + iframeDialog = content.$.getElementsByTagName( 'iframe' ).length; + + // Shim to help capturing "mousemove" over iframe. + if ( iframeDialog ) + { + dialogCover = CKEDITOR.dom.element.createFromHtml( '
' ); + content.append( dialogCover ); + } + // Calculate the offset between content and chrome size. wrapperHeight = startSize.height - dialog.parts.contents.getSize( 'height', ! ( CKEDITOR.env.gecko || CKEDITOR.env.opera || CKEDITOR.env.ie && CKEDITOR.env.quirks ) ); wrapperWidth = startSize.width - dialog.parts.contents.getSize( 'width', 1 ); @@ -1803,6 +1808,12 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3; CKEDITOR.document.removeListener( 'mouseup', mouseUpHandler ); CKEDITOR.document.removeListener( 'mousemove', mouseMoveHandler ); + if ( dialogCover ) + { + dialogCover.remove(); + dialogCover = null; + } + if ( CKEDITOR.env.ie6Compat ) { var coverDoc = currentCover.getChild( 0 ).getFrameDocument(); @@ -1852,7 +1863,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3; if ( !coverElement ) { var html = [ - '