Ticket #6247: 6247.patch
File 6247.patch, 1.7 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/floatpanel/plugin.js
100 100 block = panel.showBlock( name ); 101 101 102 102 this.allowBlur( false ); 103 104 // Record from where the focus is when open panel. 105 this._.returnFocus = new CKEDITOR.dom.element( CKEDITOR.document.$.activeElement ); 106 103 107 isShowing = 1; 104 108 105 109 var element = this.element, … … 164 168 return; 165 169 166 170 if ( this.visible && !this._.activeChild && !isShowing ) 171 { 172 // Panel close is caused by user's navigating away the focus, e.g. click outside the panel. 173 // DO NOT restore focus in this case. 174 delete this._.returnFocus; 167 175 this.hide(); 176 } 168 177 }, 169 178 this ); 170 179 … … 322 331 this.element.setStyle( 'display', 'none' ); 323 332 this.visible = 0; 324 333 this.element.getFirst().removeCustomData( 'activePanel' ); 334 335 // Return focus properly. (#6247) 336 var focusReturn = this._.returnFocus; 337 focusReturn && ( focusReturn.is( 'iframe' ) ? focusReturn.getFrameDocument().getWindow() : focusReturn ).focus(); 325 338 } 326 339 }, 327 340