tor-browser

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

number-disabled.html (888B)


      1 <!doctype html>
      2 <title>disabled works properly for number inputs</title>
      3 <link rel="help" href="https://html.spec.whatwg.org/#enabling-and-disabling-form-controls:-the-disabled-attribute">
      4 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1461706">
      5 <link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <input type="number" disabled>
      9 <input type="number" disabled style="-moz-appearance: textfield; -webkit-appearance: textfield">
     10 <script>
     11  test(function() {
     12    for (const element of Array.from(document.querySelectorAll('input'))) {
     13      element.focus();
     14      assert_true(element.disabled);
     15      assert_equals(document.activeElement, document.body);
     16    }
     17  }, "disabled works on number input regardless of appearance");
     18 </script>