selection-modify-extend-forward-on-option.html (461B)
1 <!doctype html> 2 <title>Extending selection forward on option should not crash</title> 3 <style> 4 * { 5 display: inherit; 6 } 7 </style> 8 9 <!-- 10 This test passes if it does not crash. 11 --> 12 13 <select style="display: table-cell;" name="test" multiple> 14 <option style="display: contents;">Test</option> 15 </select> 16 17 <script> 18 window.addEventListener('load', () => { 19 document.execCommand('selectall'); 20 window.getSelection().modify('extend', 'forward', 'line'); 21 }); 22 </script>