Skip to content

Commit

Permalink
Test fixed: It's enough to put the focus inside text node of nested e…
Browse files Browse the repository at this point in the history
…ditable, and the selection will no longer be broken.
  • Loading branch information
mlewand committed Mar 30, 2016
1 parent 40810a0 commit 6c3bc58
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/core/editable/domfixnestededitable.js
Expand Up @@ -38,8 +38,9 @@
sel = editor.getSelection(),
range = editor.createRange();

range.setStart( nestedEditable, 0 );
range.setEnd( nestedEditable, 0 );
nestedEditable.focus();
range.setStart( nestedEditable.getFirst(), 0 );
range.setEnd( nestedEditable.getFirst(), 0 );
sel.selectRanges( [ range ] );

assert.isInnerHtmlMatching( expected, bender.tools.selection.getWithHtml( editor ),
Expand Down

0 comments on commit 6c3bc58

Please sign in to comment.