From 5b30f5bf3ef84407f0b531e6ebb9ff6255937fca Mon Sep 17 00:00:00 2001 From: "m.lewandowski" Date: Wed, 4 Dec 2013 09:28:11 +0100 Subject: [PATCH] Fix for IE exception thrown rarely in selectionchange event. --- plugins/wysiwygarea/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wysiwygarea/plugin.js b/plugins/wysiwygarea/plugin.js index 95a221eac72..bd7f224e566 100644 --- a/plugins/wysiwygarea/plugin.js +++ b/plugins/wysiwygarea/plugin.js @@ -163,7 +163,7 @@ doc.getDocumentElement().addClass( doc.$.compatMode ); // Prevent IE from leaving new paragraph after deleting all contents in body. (#6966) - editor.config.enterMode != CKEDITOR.ENTER_P && doc.on( 'selectionchange', function() { + editor.config.enterMode != CKEDITOR.ENTER_P && this.attachListener( doc, 'selectionchange', function() { var body = doc.getBody(), sel = editor.getSelection(), range = sel && sel.getRanges()[ 0 ];