There was an error while loading. Please reload this page.
1 parent 65d3539 commit d6cba84Copy full SHA for d6cba84
1 file changed
lib/utils/domFns.js
@@ -150,7 +150,12 @@ export function addUserSelectStyles(doc: ?Document) {
150
export function removeUserSelectStyles(doc: ?Document) {
151
try {
152
if (doc && doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection');
153
- window.getSelection().removeAllRanges(); // remove selection caused by scroll
+ if (doc.selection) {
154
+ // $FlowIgnore: IE
155
+ doc.selection.empty();
156
+ } else {
157
+ window.getSelection().removeAllRanges(); // remove selection caused by scroll
158
+ }
159
} catch (e) {
160
// probably IE
161
}
0 commit comments