Ticket #5149: 5149.patch
File 5149.patch, 1.5 KB (added by , 14 years ago) |
---|
-
_source/plugins/maximize/plugin.js
87 87 }; 88 88 } 89 89 90 function refreshCursor( editor ) 91 { 92 if ( editor.focusManager.hasFocus ) 93 { 94 var focusGrabber = editor.container.append( CKEDITOR.dom.element.createFromHtml( 95 '<span tabindex="-1" style="position:absolute; left:-10000" role="presentation"></span>' ) ); 96 97 focusGrabber.on( 'focus', function() 98 { 99 editor.focus(); 100 } ); 101 focusGrabber.focus(); 102 focusGrabber.remove(); 103 } 104 } 105 90 106 CKEDITOR.plugins.add( 'maximize', 91 107 { 92 108 init : function( editor ) … … 190 206 top : ( -1 * offset.y ) + 'px' 191 207 } ); 192 208 209 // Fixing positioning editor chrome in Firefox break design mode. (#5149) 210 CKEDITOR.env.gecko && refreshCursor( editor ); 211 193 212 // Add cke_maximized class. 194 213 container.addClass( 'cke_maximized' ); 195 214 } … … 242 261 { 243 262 if ( savedSelection ) 244 263 { 264 // Fixing positioning editor chrome in Firefox break design mode. (#5149) 265 CKEDITOR.env.gecko && refreshCursor( editor ); 266 245 267 editor.getSelection().selectRanges(savedSelection); 246 268 var element = editor.getSelection().getStartElement(); 247 269 element && element.scrollIntoView( true );