Changeset 7546
- Timestamp:
- 07/06/12 10:25:07 (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js
r7544 r7546 746 746 var doc = editor.document; 747 747 748 // Applies to Fx 3.x. 749 if ( editable && CKEDITOR.env.gecko && 750 CKEDITOR.env.version > 10900 && 751 CKEDITOR.env.version < 20000 ) 752 blinkCursor(); 753 else if ( CKEDITOR.env.opera ) 748 if ( CKEDITOR.env.gecko || CKEDITOR.env.opera ) 754 749 doc.getBody().focus(); 755 750 // Webkit needs focus for the first time on the HTML element. (#6153) … … 969 964 } 970 965 } 966 967 console.log( editor.getSnapshot() ); 971 968 972 969 /* … … 1283 1280 // Use correct cursor for these elements 1284 1281 editor.addCss( 'img, input, textarea { cursor: default;}' ); 1285 1286 // Switch on design mode for a short while and close it after then.1287 function blinkCursor( retry )1288 {1289 if ( editor.readOnly )1290 return;1291 1292 CKEDITOR.tools.tryThese(1293 function()1294 {1295 editor.document.$.designMode = 'on';1296 setTimeout( function()1297 {1298 editor.document.$.designMode = 'off';1299 if ( CKEDITOR.currentInstance == editor )1300 editor.document.getBody().focus();1301 }, 50 );1302 },1303 function()1304 {1305 // The above call is known to fail when parent DOM1306 // tree layout changes may break design mode. (#5782)1307 // Refresh the 'contentEditable' is a cue to this.1308 editor.document.$.designMode = 'off';1309 var body = editor.document.getBody();1310 body.setAttribute( 'contentEditable', false );1311 body.setAttribute( 'contentEditable', true );1312 // Try it again once..1313 !retry && blinkCursor( 1 );1314 });1315 }1316 1282 1317 1283 // Disable form elements editing mode provided by some browers. (#5746)
Note: See TracChangeset
for help on using the changeset viewer.
