Ticket #4044: 4044.patch
File 4044.patch, 1.2 KB (added by , 14 years ago) |
---|
-
_source/plugins/toolbar/plugin.js
47 47 if ( CKEDITOR.env.ie ) 48 48 setTimeout( function(){ editor.toolbox.focus(); }, 100 ); 49 49 else 50 { 51 if ( CKEDITOR.env.opera ) 52 editor.toolbox.focusSwitch.focus(); 53 50 54 editor.toolbox.focus(); 51 } 52 } 53 } 55 } 56 } 57 } 58 } 54 59 }; 55 60 56 61 CKEDITOR.plugins.add( 'toolbar', … … 140 145 return false; 141 146 142 147 case 27 : // ESC 148 if ( CKEDITOR.env.opera ) 149 editor.toolbox.focusSwitch.focus(); 143 150 editor.focus(); 144 151 return false; 145 152 … … 345 352 } 346 353 }); 347 354 355 // Opera requires an invisible input to 'redirect' the focus when 356 // switching focus from toolbar to editor (#4044). 357 if ( CKEDITOR.env.opera ) 358 { 359 editor.on( 'uiReady', function() 360 { 361 editor.toolbox.focusSwitch = editor.container.append( CKEDITOR.dom.element.createFromHtml( 362 '<input tabindex="-1" style="position:absolute;width:1px;height:0px" role="presentation" />' ) ); 363 } ); 364 } 365 348 366 editor.addCommand( 'toolbarFocus', commands.toolbarFocus ); 349 367 } 350 368 });