tor-browser

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

queue-non-focusable.html (659B)


      1 <!DOCTYPE html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <script src="resources/utils.js"></script>
      5 
      6 <textarea autofocus disabled></textarea>
      7 <select autofocus></select>
      8 
      9 <script>
     10 'use strict';
     11 
     12 promise_test(async () => {
     13  const [textarea, select] = document.querySelectorAll('[autofocus]');
     14  textarea.disabled = false;
     15 
     16  await waitUntilStableAutofocusState();
     17  assert_equals(document.activeElement, textarea);
     18  assert_not_equals(document.activeElement, select);
     19 }, 'If the first autofocus element is not focusable, but becomes focusable before a frame, it should be focused.');
     20 </script>