Skip to content

Commit

Permalink
Prevent infinitive recursion on IEs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed May 21, 2013
1 parent bcf0c72 commit 260015a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions core/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,21 @@
nativeSel.removeAllRanges();
nativeSel.addRange( nativeRange );
}
else {
// IE in specific case may also fire selectionchange.
// We cannot block bubbling selectionchange, so at least we
// can prevent from falling into inf recursion caused by fix for #9699
// (see wysiwygarea plugin).
// http://dev.ckeditor.com/ticket/10438#comment:13
var listener2 = root.getDocument().on( 'selectionchange', function( evt ) {
evt.cancel();
}, null, null, -100 );
}

doFocus && root.focus();

listener.removeListener();
listener2 && listener2.removeListener();
}

// Setup all editor instances for the necessary selection hooks.
Expand Down

0 comments on commit 260015a

Please sign in to comment.