bug1496118.html (984B)
1 <!DOCTYPE HTML> 2 <html class="reftest-wait"> 3 <head> 4 <script src="/tests/SimpleTest/EventUtils.js"></script> 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 <style> 7 input, input:active { border: none; } 8 </style> 9 </head> 10 <body> 11 <input id="input1" value="aaaaaaaaaaaaaaaaaaaa"> 12 <div id=div1 style="height: 100px;"> 13 <textarea id="textarea1"></textarea> 14 </div> 15 <script> 16 SimpleTest.waitForFocus(() => { 17 let div1 = document.getElementById('div1'); 18 let textarea1 = document.getElementById('textarea1'); 19 div1.addEventListener("drop", e => { 20 e.preventDefault(); 21 22 textarea1.style = "display: none;"; 23 SimpleTest.executeSoon(() => { 24 synthesizeKey("A"); 25 document.documentElement.removeAttribute("class"); 26 }); 27 }); 28 29 let input1 = document.getElementById('input1'); 30 input1.focus(); 31 input1.setSelectionRange(0, input1.value.length); 32 33 synthesizeDrop(input1, textarea1, [[{type: "text/plain", data: "foo"}]]); 34 }); 35 </script> 36 </body> 37 </html>