Ticket #6247: 6247_2.patch
File 6247_2.patch, 2.5 KB (added by , 13 years ago) |
---|
-
_source/plugins/richcombo/plugin.js
255 255 panel.onEscape = function() 256 256 { 257 257 panel.hide(); 258 me.document.getById( 'cke_' + me.id ).getFirst().getNext().focus();259 258 }; 260 259 261 260 list.onClick = function( value, marked ) -
_source/plugins/stylescombo/plugin.js
96 96 97 97 combo.commit(); 98 98 99 combo.onOpen();100 99 }); 101 100 }, 102 101 -
_source/plugins/floatpanel/plugin.js
51 51 52 52 this._ = 53 53 { 54 editor : editor, 54 55 // The panel that will be floating. 55 56 panel : panel, 56 57 parentElement : parentElement, … … 102 103 this.allowBlur( false ); 103 104 isShowing = 1; 104 105 106 // Record from where the focus is when open panel. 107 this._.returnFocus = this._.editor.focusManager.hasFocus ? this._.editor : new CKEDITOR.dom.element( CKEDITOR.document.$.activeElement ); 108 109 105 110 var element = this.element, 106 111 iframe = this._.iframe, 107 112 definition = this._.definition, … … 164 169 return; 165 170 166 171 if ( this.visible && !this._.activeChild && !isShowing ) 172 { 173 // Panel close is caused by user's navigating away the focus, e.g. click outside the panel. 174 // DO NOT restore focus in this case. 175 delete this._.returnFocus; 167 176 this.hide(); 177 } 168 178 }, 169 179 this ); 170 180 … … 322 332 this.element.setStyle( 'display', 'none' ); 323 333 this.visible = 0; 324 334 this.element.getFirst().removeCustomData( 'activePanel' ); 325 } 335 336 // Return focus properly. (#6247) 337 var focusReturn = this._.returnFocus; 338 if ( focusReturn ) 339 { 340 // Webkit requires focus moved out panel iframe first. 341 if ( CKEDITOR.env.webkit && focusReturn.type ) 342 focusReturn.getWindow().$.focus(); 343 344 focusReturn.focus(); 345 } 346 } 326 347 }, 327 348 328 349 allowBlur : function( allow ) // Prevent editor from hiding the panel. #3222.