Ticket #3219: 3219_2.patch
File 3219_2.patch, 5.2 KB (added by , 14 years ago) |
---|
-
_source/plugins/dialog/plugin.js
517 517 else 518 518 return; 519 519 520 CKEDITOR.fire( 'beforeDialogOpen', definition ); 521 520 522 // First, set the dialog to an appropriate size. 521 523 this.resize( definition.minWidth, definition.minHeight ); 522 524 -
_source/plugins/floatpanel/plugin.js
64 64 children : [], 65 65 dir : editor.lang.dir 66 66 }; 67 68 CKEDITOR.on( "beforeDialogOpen" , function() 69 { 70 this.hide(); 71 }, this ); 67 72 }, 68 73 69 74 proto : … … 124 129 display : '' 125 130 }); 126 131 132 // Non IE prefer the event into a window object. 133 var focusElement = CKEDITOR.env.ie ? iframe : new CKEDITOR.dom.window( iframe.$.contentWindow ); 134 127 135 // Configure the IFrame blur event. Do that only once. 128 136 if ( !this._.blurSet ) 129 137 { 130 // Non IE prefer the event into a window object. 131 var focused = CKEDITOR.env.ie ? iframe : new CKEDITOR.dom.window( iframe.$.contentWindow ); 138 focusElement.on( 'blur', function() 139 { 140 if ( !this._.panel.allowBlur ) 141 return; 132 142 133 focused.on( 'blur', function()134 {135 143 if ( !this._.activeChild ) 136 144 this.hide(); 137 145 }, 138 146 this ); 139 147 140 focus ed.on( 'focus', function()148 focusElement.on( 'focus', function() 141 149 { 142 150 this._.focused = true; 143 151 this.hideChild(); 152 this.allowBlur( true ); 144 153 }, 145 154 this ); 146 155 … … 183 192 // Set the IFrame focus, so the blur event gets fired. 184 193 setTimeout( function() 185 194 { 186 iframe.$.contentWindow.focus();195 focusElement.focus(); 187 196 }, 0); 188 197 }, 0); 189 190 198 if ( this.onShow ) 191 199 this.onShow.call( this ); 192 200 }, 193 201 202 allowBlur : function( allow ) 203 { 204 this._.panel.allowBlur = allow; 205 }, 206 194 207 hide : function() 195 208 { 196 209 if ( !this.onHide || this.onHide.call( this ) !== true ) -
_source/plugins/panel/plugin.js
260 260 261 261 hide : function() 262 262 { 263 this.element.setStyle( 'display', 'none' ); 263 if ( !this.onHide || this.onHide.call( this ) !== true ) 264 this.element.setStyle( 'display', 'none' ); 264 265 }, 265 266 266 267 onKeyDown : function( keystroke ) -
_source/plugins/panelbutton/plugin.js
85 85 86 86 this.createPanel( editor ); 87 87 88 var panel = _.panel; 89 panel.allowBlur( false ); 90 88 91 if ( _.on ) 89 92 { 90 _.panel.hide();93 panel.hide(); 91 94 return; 92 95 } 96 panel.showBlock( this._.id, new CKEDITOR.dom.element( $element ), 4 ); 93 97 94 _.panel.showBlock( this._.id, new CKEDITOR.dom.element( $element ), 4 ); 98 if ( !CKEDITOR.env.ie ) 99 { 100 setTimeout( function() 101 { 102 if (CKEDITOR.env.gecko ) 103 panel._.iframe.$.focus(); // Force blur. 104 panel.allowBlur( true ); 105 }, 0 ); 106 } 107 95 108 }, 96 109 this ); 97 110 var keyDownFn = CKEDITOR.tools.addFunction( function( ev, element ){ … … 210 223 me.document.getById( _.id ).focus(); 211 224 }; 212 225 213 214 226 if ( this.onBlock ) 215 227 this.onBlock( panel, _.id ); 228 229 // On block hide. 230 panel.getBlock( _.id ).onHide = function() 231 { 232 _.on = 0; 233 me.setState( CKEDITOR.TRISTATE_OFF ); 234 } 216 235 }, 217 236 218 237 setState : CKEDITOR.ui.button.prototype.setState -
_source/plugins/richcombo/plugin.js
93 93 94 94 this.createPanel( editor ); 95 95 96 var panel = _.panel; 97 panel.allowBlur( false ); 98 96 99 if ( _.on ) 97 100 { 98 _.panel.hide();101 panel.hide(); 99 102 return; 100 103 } 101 104 … … 111 114 else 112 115 _.list.unmarkAll(); 113 116 114 _.panel.showBlock( this.id, new CKEDITOR.dom.element( $element ).getFirst(), 4 ); 117 panel.showBlock( this.id, new CKEDITOR.dom.element( $element ).getFirst(), 4 ); 118 119 if ( !CKEDITOR.env.ie ) 120 { 121 setTimeout( function() 122 { 123 if ( CKEDITOR.env.gecko ) 124 panel._.iframe.$.focus(); // Force blur. 125 panel.allowBlur( true ); 126 }, 0); 127 } 115 128 }, 116 129 this ); 117 130 … … 264 277 this._.panel = panel; 265 278 this._.list = list; 266 279 280 // On block hide. 281 panel.getBlock( this.id ).onHide = function() 282 { 283 me._.on = 0; 284 me.setState( CKEDITOR.TRISTATE_OFF ); 285 } 286 267 287 if ( this.init ) 268 288 this.init(); 269 289 },