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

Views with keyUpEvents/keyDownEvents set on them should form a stacking context #14090

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

acoates-ms
Copy link
Contributor

@acoates-ms acoates-ms commented Nov 6, 2024

Generally, events that bubble on the JS side do not require a stacking context. But in the case of keyUpEvents/keyDownEvents, those affect the event bubbling on the native side, and so they require a stacking context.

Also modifying the setting of onKeyUp/onKeyDown on view to only be set if the view has keyUpEvents/keyDownEvents or onKeyUp/onKeyDown are set on it, as they will never do anyway if they are both undefined.

Microsoft Reviewers: Open in CodeFlow

@acoates-ms acoates-ms requested a review from a team as a code owner November 6, 2024 20:02
// onFocus/onBlur are often just used for listening to bubbled events.
// Only Views which are marked as focusable can actually trigger the events, which will already avoid being collapsed.
constexpr decltype(WindowsViewEvents::bits) focusEventsMask = {
(1 << (int)WindowsViewEvents::Offset::Focus) & (1 << (int)WindowsViewEvents::Offset::Blur)};
Copy link
Collaborator

@rozele rozele Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny enough, this never did anything anyway, since you wanted | here instead of & :)

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.

2 participants