bug1524266-1-ref.html (770B)
1 <!doctype html> 2 <html class="reftest-wait"> 3 <title>Caret doesn't get stuck in a select element inside an editor</title> 4 <script src="/tests/SimpleTest/EventUtils.js"></script> 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 <style> 7 div:focus-within { 8 outline: 3px solid blue; 9 } 10 span { 11 outline: none; 12 } 13 </style> 14 <div> 15 xx 16 <select> 17 <option value="">Placeholder</option> 18 </select> 19 <span contenteditable="true" spellcheck="false">xxx</span> 20 </div> 21 <script> 22 SimpleTest.waitForFocus(function() { 23 document.querySelector('[contenteditable="true"]').focus(); 24 requestAnimationFrame(function() { 25 for (let i = 0; i < 2; ++i) 26 synthesizeKey("KEY_ArrowRight"); 27 document.documentElement.removeAttribute("class"); 28 }); 29 }); 30 </script>