We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a6e6b65 + 81959f0 commit 6628d94Copy full SHA for 6628d94
src/adapter/core.js
@@ -171,13 +171,15 @@ extend(
171
const nativeEditor = this.get('nativeEditor');
172
const isMSSelection = typeof window.getSelection != 'function';
173
174
- if (isMSSelection) {
175
- nativeEditor.document.$.selection.empty();
176
- } else {
177
- nativeEditor.document
178
- .getWindow()
179
- .$.getSelection()
180
- .removeAllRanges();
+ if (nativeEditor.document) {
+ if (isMSSelection) {
+ nativeEditor.document.$.selection.empty();
+ } else {
+ nativeEditor.document
+ .getWindow()
+ .$.getSelection()
181
+ .removeAllRanges();
182
+ }
183
}
184
},
185
0 commit comments