OLD | NEW |
1 <object width="0" height="0" id="emptyLayer"/> | 1 <object width="0" height="0" id="emptyLayer"/> |
2 <script> | 2 <script> |
3 var range = document.createRange(); | 3 var range = document.createRange(); |
4 var emptyLayer = document.getElementById("emptyLayer"); | 4 var emptyLayer = document.getElementById("emptyLayer"); |
5 var textNode1 = layer1.firstChild; | 5 var textNode1 = layer1.firstChild; |
6 range.setStart(textNode1, 0); | 6 range.setStart(textNode1, 0); |
7 range.collapse(); | 7 range.collapse(); |
8 document.getSelection().addRange(range); | 8 document.getSelection().addRange(range); |
9 | 9 |
10 // Even though the logical caret activated by the selection has an empty | 10 // Even though the logical caret activated by the selection has an empty |
11 // area, it should still propagate as a valid selection region. | 11 // area, it should still propagate as a valid selection region. |
12 window.expectedResult = [emptyLayer, 8, 8, 8, 8, emptyLayer, 8, 8, 8, 8]; | 12 window.expectedResult = [emptyLayer, 8, 8, 8, 8, emptyLayer, 8, 8, 8, 8, fal
se, false]; |
13 </script> | 13 </script> |
14 | 14 |
OLD | NEW |