Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
| 5 <meta name="viewport" content="width-device-width"> | 5 <meta name="viewport" content="width-device-width"> |
| 6 <title>Virtual Keyboard test page</title> | 6 <title>Virtual Keyboard test page</title> |
| 7 <script> | |
| 8 function syncFocus() { | |
| 9 var input = document.getElementById('text'); | |
| 10 input.blur(); | |
| 11 input.focus(); | |
| 12 } | |
| 13 function asyncFocus() { | |
| 14 var input = document.getElementById('text'); | |
| 15 // Keyboard hiding is dalayed by 100 ms, so here we | |
| 16 // wait 200 ms to make sure virtual keyboard is hidden. | |
|
oshima
2017/03/27 16:57:54
it's not clear why we need this. Shouldn't keyboar
oka
2017/03/28 11:13:26
Unfortunately no. The task to hide keyboard is del
oshima
2017/03/28 12:00:25
Whey it reopens it? Shouldn't it stay hidden becau
oka
2017/03/28 12:50:03
Sorry to make confusion, but in the previous comme
| |
| 17 setTimeout(function(){input.focus();}, 200); | |
| 18 } | |
| 19 </script> | |
| 7 </head> | 20 </head> |
| 8 <body> | 21 <body> |
| 9 <p> | 22 <p> |
| 10 <label id="blur">blur</label> | 23 <label id="blur">blur</label> |
| 11 <input id="text" type="text" placeholder="type=text"></input> | 24 <input id="text" type="text" placeholder="type=text"></input> |
| 25 <!-- test for crbug.com/642513 --> | |
| 26 <button id="sync" onclick="syncFocus()">sync</button> | |
| 27 <button id="async" onclick="asyncFocus()">async</button> | |
| 12 </p> | 28 </p> |
| 13 </body> | 29 </body> |
| 14 </html> | 30 </html> |
| OLD | NEW |