-
Notifications
You must be signed in to change notification settings - Fork 407
Remove click action from shadow DOM element handler #4162
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
Conversation
The handler no longer triggers a click event on the found element in the shadow DOM, focusing it only. This change prevents unintended click actions when interacting with elements programmatically.
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.
Pull request overview
This PR removes the element.click() call from the shadow DOM element handler in the WebView external message handler, leaving only the element.focus() call. The change simplifies the handleElementFocus method by removing an automatic click action that was triggered before focusing.
- Removes automatic click action when focusing elements in shadow DOM
- Retains the focus functionality for accessibility and keyboard navigation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4162 +/- ##
=======================================
Coverage ? 45.23%
=======================================
Files ? 249
Lines ? 14286
Branches ? 0
=======================================
Hits ? 6462
Misses ? 7824
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
<!-- Thank you for submitting a Pull Request and helping to improve Home Assistant. Please complete the following sections to help the processing and review of your changes. Please do not delete anything from this template. --> ## Summary <!-- Provide a brief summary of the changes you have made and most importantly what they aim to achieve --> ## Screenshots <!-- If this is a user-facing change not in the frontend, please include screenshots in light and dark mode. --> ## Link to pull request in Documentation repository <!-- Pull requests that add, change or remove functionality must have a corresponding pull request in the Companion App Documentation repository (https://github.com/home-assistant/companion.home-assistant). Please add the number of this pull request after the "#" --> Documentation: home-assistant/companion.home-assistant# ## Any other notes <!-- If there is any other information of note, like if this Pull Request is part of a bigger change, please include it here. --> (cherry picked from commit 4f6fbac)
Summary
Screenshots
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes