Skip to content

Commit ae72e45

Browse files
author
Garry Yao
committed
Fixed DOM selection may return empty range on "beforedeactive" event in IE.
1 parent 9df7529 commit ae72e45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/selection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@
211211
lastSel.lock();
212212
}
213213

214-
// For IE, we can retrieve the last correct DOM selection upon the "beforedeactivate" event.
214+
// For old IEs, we can retrieve the last correct DOM selection upon the "beforedeactivate" event.
215215
// For the rest, a more frequent check is required for each selection change made.
216-
if ( CKEDITOR.env.ie )
216+
if ( isMSSelection )
217217
editable.attachListener( editable, 'beforedeactivate', saveSel, null, null, -1 );
218218
else
219219
editable.attachListener( editor, 'selectionCheck', saveSel, null, null, -1 );

0 commit comments

Comments
 (0)