fullscreen_with_input.html 428 B

1234567891011121314151617
  1. <html>
  2. <body>
  3. <input id="x" type="text"/>
  4. <p>Content for on screen keyboard testing.</p>
  5. </body>
  6. <script>
  7. var actionCount = 0;
  8. function doAction() {
  9. if (actionCount++ == 1) {
  10. document.documentElement.requestFullscreen();
  11. } else {
  12. document.getElementById("x").focus();
  13. }
  14. }
  15. document.addEventListener('click', function(e) { doAction(); }, false);
  16. </script>
  17. </html>