0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 07:13:08 -05:00

Merge pull request #224 from superhuman/fix_tests

Fix tests that call selectAll
This commit is contained in:
Neil Jenkins 2016-08-23 20:49:26 +10:00 committed by GitHub
commit cbee85ae61

View file

@ -26,6 +26,7 @@ describe('Squire RTE', function () {
}); });
function selectAll(editor) { function selectAll(editor) {
doc.getSelection().removeAllRanges()
var range = doc.createRange(); var range = doc.createRange();
range.setStart(doc.body.childNodes.item(0), 0); range.setStart(doc.body.childNodes.item(0), 0);
range.setEnd(doc.body.childNodes.item(0), doc.body.childNodes.item(0).childNodes.length); range.setEnd(doc.body.childNodes.item(0), doc.body.childNodes.item(0).childNodes.length);