diff --git a/source/Editor.ts b/source/Editor.ts index 8c768ce..bad81b6 100644 --- a/source/Editor.ts +++ b/source/Editor.ts @@ -639,12 +639,17 @@ class Squire { } else { const selection = window.getSelection(); if (selection) { - selection.setBaseAndExtent( - range.startContainer, - range.startOffset, - range.endContainer, - range.endOffset, - ); + if ('setBaseAndExtent' in Selection.prototype) { + selection.setBaseAndExtent( + range.startContainer, + range.startOffset, + range.endContainer, + range.endOffset, + ); + } else { + selection.removeAllRanges(); + selection.addRange(range); + } } } return this;