mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
test(web-e2e): reach row buttons with Option+Tab on WebKit (#1629)
The two "channel scrolling keeps focus after selection" cases (and the Xtream "channel focus and separate scrollbar" cases, which press Tab the same way) failed deterministically on Playwright WebKit while passing on Chromium and Firefox. Playwright's WebKit emulates Safari's default keyboard preference, under which plain Tab visits only text fields and links: from the focused channel pane the key landed on the sidebar search field instead of the first row button. Option+Tab reaches the button and then the favorite action in the same DOM order Chromium's Tab follows, so the app's focus contract (ChannelScrollFocusDirective) is intact and this is Safari's Tab semantics, not an app bug. Add a `pressTab` E2E helper that presses Alt+Tab only on webkit and keeps the literal Tab / Shift+Tab on chromium and firefox, use it at the four Tab presses toward buttons, and note Safari's behaviour in the keyboard scrolling contract. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
634a66b1e4
commit
43c1ceac16
4 files changed
+39
-7
No files matched your search
@@ -162,7 +162,10 @@ ArrowUp/Down, PageUp/Down, Home/End and Space retain native scrolling there;
|
||||
scroll keys do not bubble into document-level player shortcuts. A row's main
|
||||
button remains separate from favorite/info actions, supports native Enter and
|
||||
Space activation, and retains keyboard focus on activation. Tab/Shift+Tab use
|
||||
the normal DOM order. Scrolling from a virtual row moves focus to its viewport
|
||||
the normal DOM order; Safari's default keyboard preference skips buttons on
|
||||
plain Tab, so there the row button is reached with Option+Tab (WebKit E2E
|
||||
runs press it through `pressTab` in `apps/web-e2e/src/e2e-helpers.ts`).
|
||||
Scrolling from a virtual row moves focus to its viewport
|
||||
before CDK can recycle the row; asynchronous data updates never move focus.
|
||||
Xtream aligns a newly selected channel only when it is outside the viewport;
|
||||
updates to the same selected ID never re-align it. A smooth scroll to an
|
||||
|
||||
Reference in new issue
Block a user