Non-Tab keys return immediately, so callers may hand over every keydown
without pre-filtering. Focus is only redirected at the two ends of the cycle:
anywhere in the middle the browser's native order is left alone.
⚠️ The offsetParent visibility filter is carried over verbatim from the
three call sites that already had it. It cannot be covered by a test: under
happy-dom offsetParent is undefined, so the filter keeps every node and
the assertion would pass either way. Do not "improve" it into a
getComputedStyle check — that would change browser behaviour with no test
able to notice.
Keeps Tab / Shift+Tab cycling inside
container.Non-
Tabkeys return immediately, so callers may hand over everykeydownwithout pre-filtering. Focus is only redirected at the two ends of the cycle: anywhere in the middle the browser's native order is left alone.⚠️ The
offsetParentvisibility filter is carried over verbatim from the three call sites that already had it. It cannot be covered by a test: under happy-domoffsetParentisundefined, so the filter keeps every node and the assertion would pass either way. Do not "improve" it into agetComputedStylecheck — that would change browser behaviour with no test able to notice.