-
Notifications
You must be signed in to change notification settings - Fork 813
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8b87435
to
1f25e13
Compare
This reverts commit 32e1550.
johnjenkins
approved these changes
Jul 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?
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.