 Chromium Code Reviews
 Chromium Code Reviews Issue 258063005:
  Blink does not respect input.selectionStart and input.selectionEnd for some cases  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master
    
  
    Issue 258063005:
  Blink does not respect input.selectionStart and input.selectionEnd for some cases  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master| OLD | NEW | 
|---|---|
| 1 <p>This tests for a bug where text pasted into a textarea would appear one chara cter before the position where it was pasted.</p> | 1 <p>This tests for a bug where text pasted into a textarea would appear one chara cter before the position where it was pasted.</p> | 
| 2 <textarea rows=5 id="test">xx</textarea> | 2 <textarea rows=5 id="test">xx</textarea> | 
| 3 <script> | 3 <script> | 
| 4 if (window.testRunner) | 4 if (window.testRunner) | 
| 5 testRunner.dumpAsText(); | 5 testRunner.dumpAsText(); | 
| 6 var e = document.getElementById("test"); | 6 var e = document.getElementById("test"); | 
| 7 e.setSelectionRange(1, 1); | 7 var startX = e.offsetLeft + 10; | 
| 
tkent
2014/06/01 23:40:55
Ditto.
 
harpreet.sk
2014/07/02 10:13:05
Done.
 | |
| 8 var startY = e.offsetTop + 4; | |
| 9 eventSender.mouseMoveTo(startX,startY); | |
| 10 eventSender.mouseDown(); | |
| 11 eventSender.mouseUp(); | |
| 8 document.execCommand("InsertHTML", false, "(There should be one 'x' before and a fter this sentence.)"); | 12 document.execCommand("InsertHTML", false, "(There should be one 'x' before and a fter this sentence.)"); | 
| 9 if (e.value == "x(There should be one 'x' before and after this sentence.)x") | 13 if (e.value == "x(There should be one 'x' before and after this sentence.)x") | 
| 10 document.write("<p>Hooray, test succeeded.</p>"); | 14 document.write("<p>Hooray, test succeeded.</p>"); | 
| 11 else | 15 else | 
| 12 document.write("<p>Test failed, value is '" + e.value + "'.</p>"); | 16 document.write("<p>Test failed, value is '" + e.value + "'.</p>"); | 
| 13 </script> | 17 </script> | 
| OLD | NEW |