From 082fb79fcdf2b89faa7b856020080b0f607bdd8e Mon Sep 17 00:00:00 2001 From: Islam Sharabash Date: Mon, 22 Aug 2016 12:59:51 -0700 Subject: [PATCH] Fix tests by resetting the selection when selectAll is called --- test/squire.spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/squire.spec.js b/test/squire.spec.js index 2d9869a..8d6019d 100644 --- a/test/squire.spec.js +++ b/test/squire.spec.js @@ -26,6 +26,7 @@ describe('Squire RTE', function () { }); function selectAll(editor) { + doc.getSelection().removeAllRanges() var range = doc.createRange(); range.setStart(doc.body.childNodes.item(0), 0); range.setEnd(doc.body.childNodes.item(0), doc.body.childNodes.item(0).childNodes.length);