Skip to content
Permalink
Browse files

Merge branch 't/10098'

  • Loading branch information...
oleq committed Feb 21, 2013
2 parents d360d7b + 5ab7b71 commit c335a3f90c1f06bfd3d445962614dda08bd37ee6
Showing with 11 additions and 9 deletions.
  1. +11 −9 core/selection.js
@@ -201,15 +201,17 @@
// Give the editable an initial selection on first focus,
// put selection at a consistent position at the start
// of the contents. (#5156)
editable.attachListener( editable, 'focus', function( evt ) {
evt.removeListener();

if ( restoreSel !== 0 ) {
var rng = editor.createRange();
rng.moveToElementEditStart( editable );
rng.select();
}
}, null, null, -2 );
if ( !CKEDITOR.env.opera ) {
editable.attachListener( editable, 'focus', function( evt ) {
evt.removeListener();

if ( restoreSel !== 0 ) {
var rng = editor.createRange();
rng.moveToElementEditStart( editable );
rng.select();
}
}, null, null, -2 );
}

// Plays the magic here to restore/save dom selection on editable focus/blur.
editable.attachListener( editable, 'focus', function() {

0 comments on commit c335a3f

Please sign in to comment.
You can’t perform that action at this time.