Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
1 <!DOCTYPE html>
2 <html>
3 <body onload="onLoad()">
4 <textarea></textarea>
5 <div id="start"></div>
6 <div id="end"></div>
7 <script>
8 function onLoad() {
9 var t = document.querySelector("textarea");
10 t.value = "Xaa\nbbb";
11 t.value = "aaa\nbbb\n";
12 t.value += "X";
13 document.getElementById("start").textContent = t.selectionStart;
14 document.getElementById("end").textContent = t.selectionEnd;
15 }
16 </script>
17 </body>
18 </html>