Skip to content

Conversation

@bgoncal
Copy link
Member

@bgoncal bgoncal commented Jan 6, 2026

Summary

Screenshots

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

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.
@bgoncal bgoncal self-assigned this Jan 6, 2026
Copilot AI review requested due to automatic review settings January 6, 2026 11:42
Copy link
Contributor

Copilot AI left a 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
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@3a23d4b). Learn more about missing BASE report.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bgoncal bgoncal merged commit 4f6fbac into main Jan 6, 2026
23 checks passed
@bgoncal bgoncal deleted the remove-unused-string branch January 6, 2026 13:00
bgoncal added a commit that referenced this pull request Jan 6, 2026
<!-- 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants