Ticket #4594: 4594_4.patch
File 4594_4.patch, 2.6 KB (added by , 14 years ago) |
---|
-
_source/plugins/floatpanel/plugin.js
191 191 if ( rtl ) 192 192 left -= element.$.offsetWidth; 193 193 194 element.setStyles( 195 { 196 left : left + 'px', 197 visibility : '', 198 opacity : '1' // FF3 is ignoring "visibility" 199 }); 194 var panelLoad = CKEDITOR.tools.bind( function () 195 { 196 if ( this.onShow ) 197 this.onShow.call( this ); 200 198 201 if ( block.autoSize ) 202 { 203 function setHeight() 204 { 199 if ( block.autoSize ) 200 { 205 201 var target = element.getFirst(); 206 202 var height = block.element.$.scrollHeight; 207 203 … … 216 212 // Fix IE < 8 visibility. 217 213 panel._.currentBlock.element.setStyle( 'display', 'none' ).removeStyle( 'display' ); 218 214 } 219 220 if ( panel.isLoaded )221 setHeight();222 215 else 223 panel.onLoad = setHeight; 224 } 225 else 226 element.getFirst().removeStyle( 'height' ); 216 element.getFirst().removeStyle( 'height' ); 227 217 218 var panelElement = panel.element, 219 panelWindow = panelElement.getWindow(), 220 windowScroll = panelWindow.getScrollPosition(), 221 viewportSize = panelWindow.getViewPaneSize(), 222 panelSize = 223 { 224 'height' : panelElement.$.offsetHeight, 225 'width' : panelElement.$.offsetWidth 226 }; 227 228 // If the menu is horizontal off, shift it toward 229 // the opposite language direction. 230 if ( rtl ? left < 0 : left + panelSize.width > viewportSize.width + windowScroll.x ) 231 left += ( panelSize.width * ( rtl ? 1 : -1 ) ); 232 233 // Vertical off screen is simpler. 234 if( top + panelSize.height > viewportSize.height + windowScroll.y ) 235 top -= panelSize.height; 236 237 element.setStyles( 238 { 239 top : top + 'px', 240 left : left + 'px', 241 visibility : '', 242 opacity : '1' // FF3 is ignoring "visibility" 243 } ); 244 245 isShowing = false; 246 } , this ); 247 248 panel.isLoaded ? panelLoad() : panel.onLoad = panelLoad; 228 249 // Set the IFrame focus, so the blur event gets fired. 229 250 CKEDITOR.tools.setTimeout( function() 230 251 { … … 249 270 }, 0, this); 250 271 this.visible = 1; 251 272 252 if ( this.onShow )253 this.onShow.call( this );254 255 isShowing = false;256 273 }, 257 274 258 275 hide : function()