OLD | NEW |
1 <!-- | 1 <!-- |
2 @MAC-ALLOW:AXRole* | 2 @MAC-ALLOW:AXRole* |
| 3 @WIN-ALLOW:caret_offset* |
| 4 @WIN-ALLOW:ia2_hypertext=* |
| 5 @WIN-ALLOW:IA2_STATE_MULTI_LINE |
3 @WIN-ALLOW:IA2_STATE_SINGLE_LINE | 6 @WIN-ALLOW:IA2_STATE_SINGLE_LINE |
4 @WIN-ALLOW:IA2_STATE_MULTI_LINE | |
5 @WIN-ALLOW:xml-roles* | |
6 @WIN-ALLOW:caret_offset* | |
7 @WIN-ALLOW:n_selections* | 7 @WIN-ALLOW:n_selections* |
8 @WIN-ALLOW:selection_start* | 8 @WIN-ALLOW:selection_start* |
9 @WIN-ALLOW:selection_end* | 9 @WIN-ALLOW:selection_end* |
| 10 @WIN-ALLOW:xml-roles* |
10 --> | 11 --> |
11 <!DOCTYPE html> | 12 <!DOCTYPE html> |
12 <html> | 13 <html> |
13 <body> | 14 <body> |
14 <div id="text1" role="textbox">Single line.</div> | 15 <div id="text1" role="textbox">Single line.</div> |
15 <div id="text2" role="textbox" aria-multiline="true">Multiple<br>lines.</div> | 16 <div id="text2" role="textbox" aria-multiline="true">Multiple<br>lines.</div> |
16 | 17 |
17 <script> | 18 <script> |
18 var selection = window.getSelection(); | 19 var selection = window.getSelection(); |
19 var selectionRange = document.createRange(); | 20 var selectionRange = document.createRange(); |
20 var text1 = document.getElementById("text1"); | 21 var text1 = document.getElementById("text1"); |
21 var text2 = document.getElementById("text2"); | 22 var text2 = document.getElementById("text2"); |
22 // Selection should only affect the text boxes as a whole. No caret should | 23 // Selection should only affect the text boxes as a whole. No caret should |
23 // appear within the text boxes. | 24 // appear within the text boxes. |
24 selectionRange.setStart(text1, 0); | 25 selectionRange.setStart(text1, 0); |
25 selectionRange.setEnd(text2, 1); | 26 selectionRange.setEnd(text2, 1); |
26 selection.removeAllRanges(); | 27 selection.removeAllRanges(); |
27 selection.addRange(selectionRange); | 28 selection.addRange(selectionRange); |
28 </script> | 29 </script> |
29 </body> | 30 </body> |
30 </html> | 31 </html> |
OLD | NEW |