Skip to content

fix(runtime): fix blur handling of non-scoped elements #6314

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

Merged
merged 23 commits into from
Jul 10, 2025

Conversation

christian-bromann
Copy link
Member

@christian-bromann christian-bromann commented Jun 21, 2025

What is the current behavior?

GitHub Issue Number: N/A

When Ionic Framework ion-radio-group components are not scoped/shadow and render a <slot>, child <ion-radio> components incorrectly emit blur events when the first radio is focused. This issue only occurs when radio elements are dynamically added after ~100ms of initial render, which happens during slot relocation in Stencil's runtime.

Documentation

N/A

Does this introduce a breaking change?

  • Yes
  • No

Testing

Added comprehensive test suite in test/wdio/radio-group-blur/:

The main issue is resolved - erroneous blur events during slot relocation are successfully suppressed. The edge case with very fast focus changes represents a complex timing scenario that may require additional refinement.

@johnjenkins - Could you please review this approach? I'd appreciate your feedback on the timing-based blur suppression strategy and whether there are any runtime considerations I should be aware of. The solution successfully addresses the core slot relocation issue, but I want to ensure it aligns with Stencil's runtime architecture and doesn't introduce any unintended side effects.

The current implementation focuses on the primary use case (suppressing erroneous blur during slot operations) while maintaining compatibility with legitimate user interactions.

@christian-bromann christian-bromann marked this pull request as ready for review July 10, 2025 15:33
@christian-bromann christian-bromann requested a review from a team as a code owner July 10, 2025 15:33
Copy link
Contributor

@johnjenkins johnjenkins left a comment

Choose a reason for hiding this comment

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

LGTM!

@christian-bromann christian-bromann merged commit bfbd683 into main Jul 10, 2025
70 checks passed
@christian-bromann christian-bromann deleted the cb/blur-fix branch July 10, 2025 15:42
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy