Skip to content

fix: #19212 - Tab onKeyDown only stops propagation for handled keys - #19628

Open
luber wants to merge 2 commits into
primefaces:masterfrom
luber:fix-19212
Open

fix: #19212 - Tab onKeyDown only stops propagation for handled keys#19628
luber wants to merge 2 commits into
primefaces:masterfrom
luber:fix-19212

Conversation

@luber

@luber luber commented Jun 15, 2026

Copy link
Copy Markdown

Fixes #19212

Problem

The Tab component's onKeyDown handler called event.stopPropagation() unconditionally for all keydown events, not just the keys it actually handles (Arrow keys, Home, End, PageUp/PageDown, Enter, Space).

This prevented parent components from receiving keyboard events like Escape, breaking common patterns such as closing a Dialog with Escape while a tab header is focused.

Fix

Moved event.stopPropagation() into each handled case block. Unhandled keys (e.g. Escape) now fall through the default case and propagate to parent components as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tab component stopPropagation() blocks all keydown events, not just handled keys

1 participant