Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: LayoutTests/editing/input/reveal-caret-of-multiline-input.html

Issue 392573002: HTMLTextAreaElement.setSelectionRange should not change focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix tests Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <head> 2 <head>
3 <script type="text/javascript" src="resources/reveal-utilities.js"></script> 3 <script type="text/javascript" src="resources/reveal-utilities.js"></script>
4 </head> 4 </head>
5 <body> 5 <body>
6 <div>When the caret is scrolled out, on starting typing it must be brought to th e center of the control.</div> 6 <div>When the caret is scrolled out, on starting typing it must be brought to th e center of the control.</div>
7 <textarea name="textarea" id="textarea" rows="10" cols="10"></textarea> 7 <textarea name="textarea" id="textarea" rows="10" cols="10"></textarea>
8 <script> 8 <script>
9 9
10 var textArea = document.getElementById("textarea"); 10 var textArea = document.getElementById("textarea");
11 textArea.textContent = generateNumbers(0, 30, 2, "\n"); 11 textArea.textContent = generateNumbers(0, 30, 2, "\n");
12 textArea.setSelectionRange(0, 0);
12 textArea.focus(); 13 textArea.focus();
13 textArea.selectionStart = 36; 14 textArea.selectionStart = 36;
14 if (window.eventSender) 15 if (window.eventSender)
15 eventSender.keyDown(">"); 16 eventSender.keyDown(">");
16 17
17 </script> 18 </script>
18 </body> 19 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698