Ticket #3068: 3068_2.patch
File 3068_2.patch, 4.6 KB (added by , 16 years ago) |
---|
-
plugins/floatpanel/plugin.js
64 64 children : [], 65 65 dir : editor.lang.dir 66 66 }; 67 68 var me = this; 69 70 // If the "contextmenu" plugin is loaded, register the listener. 71 if ( editor.contextMenu ) 72 { 73 editor.contextMenu.addListener( function() 74 { 75 me.hide(); 76 }); 77 } 78 editor.on( 'beforeCommandExec', function() 79 { 80 me.hide(); 81 }); 67 82 }, 68 83 69 84 proto : … … 124 139 display : '' 125 140 }); 126 141 142 if ( this.onShow ) 143 this.onShow.call( this ); 144 127 145 // Configure the IFrame blur event. Do that only once. 128 146 if ( !this._.blurSet ) 129 147 { … … 132 150 133 151 focused.on( 'blur', function() 134 152 { 153 if ( !this._.panel.allowBlur ) 154 return; 155 135 156 if ( !this._.activeChild ) 136 157 this.hide(); 137 158 }, … … 141 162 { 142 163 this._.focused = true; 143 164 this.hideChild(); 165 this.allowBlur( true ); 144 166 }, 145 167 this ); 146 168 … … 186 208 iframe.$.contentWindow.focus(); 187 209 }, 0); 188 210 }, 0); 211 }, 189 212 190 if ( this.onShow ) 191 this.onShow.call( this ); 213 allowBlur : function( allow ) 214 { 215 this._.panel.allowBlur = allow; 192 216 }, 193 217 194 218 hide : function() -
plugins/panel/plugin.js
261 261 262 262 hide : function() 263 263 { 264 this.element.setStyle( 'display', 'none' ); 264 if ( !this.onHide || this.onHide.call( this ) !== true ) 265 this.element.setStyle( 'display', 'none' ); 265 266 }, 266 267 267 268 onKeyDown : function( keystroke ) -
plugins/panelbutton/plugin.js
84 84 return; 85 85 86 86 this.createPanel( editor ); 87 var panel = _.panel; 88 panel.allowBlur( false ); 87 89 88 90 if ( _.on ) 89 91 { 90 _.panel.hide();92 panel.hide(); 91 93 return; 92 94 } 93 94 _.panel.showBlock( this._.id, new CKEDITOR.dom.element( $element ), 4 ); 95 panel.showBlock( this._.id, new CKEDITOR.dom.element( $element ), 4 ); 96 setTimeout( function() 97 { 98 if ( CKEDITOR.env.gecko ) 99 panel._.iframe.$.focus(); // Force blur. 100 panel.allowBlur( true ); 101 }, 0 ); 95 102 }, 96 103 this ); 97 104 var keyDownFn = CKEDITOR.tools.addFunction( function( ev, element ){ … … 210 217 me.document.getById( _.id ).focus(); 211 218 }; 212 219 213 214 220 if ( this.onBlock ) 215 221 this.onBlock( panel, _.id ); 222 223 panel.getBlock( _.id ).onHide = function() 224 { 225 _.on = 0; 226 me.setState( CKEDITOR.TRISTATE_OFF ); 227 } 216 228 }, 217 229 218 230 setState : CKEDITOR.ui.button.prototype.setState -
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 setTimeout( function() 120 { 121 if (CKEDITOR.env.gecko ) 122 panel._.iframe.$.focus(); // Force blur. 123 panel.allowBlur( true ); 124 }, 0 ); 115 125 }, 116 126 this ); 117 127 … … 264 274 this._.panel = panel; 265 275 this._.list = list; 266 276 277 panel.getBlock( this.id ).onHide = function() 278 { 279 me._.on = 0; 280 me.setState( CKEDITOR.TRISTATE_OFF ); 281 } 282 267 283 if ( this.init ) 268 284 this.init(); 269 285 }, -
plugins/stylescombo/plugin.js
149 149 150 150 onOpen : function() 151 151 { 152 editor.focus(); 152 if ( CKEDITOR.env.ie ) 153 editor.focus(); 153 154 154 155 var selection = editor.getSelection(); 155 156