tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

focus-file-input.html (745B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>HTML Test: file input can be programatically focused before layout</title>
      4 <link rel="help" href="https://html.spec.whatwg.org/multipage/#focus">
      5 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=505355">
      6 <link rel="author" title="Mozilla" href="https://mozilla.org/">
      7 <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
      8 <script src="/resources/testharness.js"></script>
      9 <script src="/resources/testharnessreport.js"></script>
     10 <input type="file">
     11 <script>
     12 test(function() {
     13  let input = document.querySelector("input");
     14  assert_not_equals(document.activeElement, input);
     15  input.focus();
     16  assert_equals(document.activeElement, input);
     17 });
     18 </script>