| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script> | |
| 4 function test() { | |
| 5 var ta = document.getElementById('ta'); | |
| 6 ta.focus(); | |
| 7 // Send caret to bottom of textarea | |
| 8 ta.setSelectionRange(ta.value.length, ta.value.length); | |
| 9 document.execCommand("InsertText", false, '5'); | |
| 10 document.execCommand("InsertText", false, '\n'); | |
| 11 document.execCommand("InsertText", false, '6'); | |
| 12 document.execCommand("InsertText", false, '\n'); | |
| 13 document.execCommand("InsertText", false, '7'); | |
| 14 document.execCommand("InsertText", false, '\n'); | |
| 15 document.execCommand("InsertText", false, '8'); | |
| 16 document.execCommand("InsertText", false, '\n'); | |
| 17 } | |
| 18 </script> | |
| 19 </head> | |
| 20 <body onload="test()"> | |
| 21 This tests that a scrollbar will appear when text overflows the textarea | |
| 22 <br> | |
| 23 <textarea rows=6 id="ta"> | |
| 24 1 | |
| 25 2 | |
| 26 3 | |
| 27 4 | |
| 28 </textarea> | |
| 29 </body> | |
| 30 </html> | |
| OLD | NEW |