Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix focus-trap for firefox tests #852

Merged
merged 1 commit into from Feb 1, 2024
Merged

Fix focus-trap for firefox tests #852

merged 1 commit into from Feb 1, 2024

Conversation

metin-kale
Copy link
Collaborator

Using fritz2 Event-Flows the calls for preventDefault and stopImmediatePropagation will be delayed slightly, so that the Browser might already perform the Tab Operation. To prevent this behaviour we have to use a plain JS Listener, which directly calls preventDefault and stopImmediatePropagation.

It is difficult to reproduce this problem with user interaction, but Tabbing with Playwright-Tests on Firefox causes duplicate Tab events (Browser-Default + Fritz2-Focustrap).

Using Event-Flows with preventDefault and/or stop(Immediate)Propagation might also cause other problems, but that there is no way to fix this globally in Fritz2, because Event-Handling heavily depends on Flows and Job-Handling.

@Lysander Lysander added the headless All about headless components and foundations label Feb 1, 2024
@Lysander Lysander added this to the 1.0-RC16 milestone Feb 1, 2024
@Lysander Lysander assigned metin-kale and unassigned Lysander Feb 1, 2024
@Lysander Lysander self-requested a review February 1, 2024 14:10
@Lysander Lysander merged commit 318435b into master Feb 1, 2024
2 checks passed
@Lysander Lysander deleted the mkale/focustrap branch February 1, 2024 15:37
@Lysander Lysander changed the title fixing focustrap for firefox tests Fix focus-trap for firefox tests Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
headless All about headless components and foundations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants