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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/focus-and-display-none-and-redisplay.html

Issue 2616623002: Do not send redundant selectionchange-events (decouple focus) (Closed)
Patch Set: Rebase Created 3 years, 8 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 <body> 2 <body>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 <textarea>original</textarea> 4 <textarea>original</textarea>
5 <script> 5 <script>
6 description('Unfocused TEXTAREA should not accept editing.'); 6 description('Unfocused TEXTAREA should accept editing.');
7 jsTestIsAsync = true; 7 jsTestIsAsync = true;
8 var textarea = document.querySelector('textarea'); 8 var textarea = document.querySelector('textarea');
9 textarea.addEventListener('blur', function() { 9 textarea.addEventListener('blur', function() {
10 textarea.style.display = 'inline-block'; 10 textarea.style.display = 'inline-block';
11 shouldNotBe('document.activeElement', 'textarea'); 11 shouldNotBe('document.activeElement', 'textarea');
12 document.execCommand('inserttext', false, 'add'); 12 document.execCommand('inserttext', false, 'add');
13 shouldBeEqualToString('textarea.value', 'original'); 13 shouldBeEqualToString('textarea.value', 'addoriginal');
14 finishJSTest(); 14 finishJSTest();
15 }, false); 15 }, false);
16 textarea.focus(); 16 textarea.focus();
17 textarea.style.display = 'none'; 17 textarea.style.display = 'none';
18 </script> 18 </script>
19 </body> 19 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698