Ticket #4594: 4594_6.patch
File 4594_6.patch, 3.0 KB (added by , 15 years ago) |
---|
-
_source/plugins/floatpanel/plugin.js
131 131 { 132 132 top : top + 'px', 133 133 left : '-3000px', 134 visibility : 'hidden',135 134 opacity : '0', // FF3 is ignoring "visibility" 136 135 display : '' 137 136 }); … … 191 190 if ( rtl ) 192 191 left -= element.$.offsetWidth; 193 192 194 element.setStyles( 195 { 196 left : left + 'px', 197 visibility : '', 198 opacity : '1' // FF3 is ignoring "visibility" 199 }); 200 201 if ( block.autoSize ) 202 { 203 function setHeight() 204 { 193 var panelLoad = CKEDITOR.tools.bind( function () 194 { 195 if ( block.autoSize ) 196 { 205 197 var target = element.getFirst(); 206 198 var height = block.element.$.scrollHeight; 207 199 … … 216 208 // Fix IE < 8 visibility. 217 209 panel._.currentBlock.element.setStyle( 'display', 'none' ).removeStyle( 'display' ); 218 210 } 219 220 if ( panel.isLoaded )221 setHeight();222 211 else 223 panel.onLoad = setHeight; 224 } 225 else 226 element.getFirst().removeStyle( 'height' ); 212 element.getFirst().removeStyle( 'height' ); 227 213 228 // Set the IFrame focus, so the blur event gets fired. 214 var panelElement = panel.element, 215 panelWindow = panelElement.getWindow(), 216 windowScroll = panelWindow.getScrollPosition(), 217 viewportSize = panelWindow.getViewPaneSize(), 218 panelSize = 219 { 220 'height' : panelElement.$.offsetHeight, 221 'width' : panelElement.$.offsetWidth 222 }; 223 224 // If the menu is horizontal off, shift it toward 225 // the opposite language direction. 226 if ( rtl ? left < 0 : left + panelSize.width > viewportSize.width + windowScroll.x ) 227 left += ( panelSize.width * ( rtl ? 1 : -1 ) ); 228 229 // Vertical off screen is simpler. 230 if( top + panelSize.height > viewportSize.height + windowScroll.y ) 231 top -= panelSize.height; 232 233 element.setStyles( 234 { 235 top : top + 'px', 236 left : left + 'px', 237 opacity : '1' 238 } ); 239 240 } , this ); 241 242 panel.isLoaded ? panelLoad() : panel.onLoad = panelLoad; 243 244 // Set the panel frame focus, so the blur event gets fired. 229 245 CKEDITOR.tools.setTimeout( function() 230 246 { 231 247 if ( definition.voiceLabel ) … … 239 255 iframe.setAttribute( 'title', ' ' ); 240 256 } 241 257 } 242 258 243 259 iframe.$.contentWindow.focus(); 244 245 260 // We need this get fired manually because of unfired focus() function. 246 if ( CKEDITOR.env.ie && !CKEDITOR.env.quirks )247 this.allowBlur( true ); 261 this.allowBlur( true ); 262 248 263 }, 0, this); 249 264 }, 0, this); 250 265 this.visible = 1;