Fix using elementId in handleElementFocus script#4442
Merged
bgoncal merged 1 commit intohome-assistant:mainfrom Mar 23, 2026
Merged
Fix using elementId in handleElementFocus script#4442bgoncal merged 1 commit intohome-assistant:mainfrom
bgoncal merged 1 commit intohome-assistant:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the injected handleElementFocus JavaScript so elementId is defined within the script (avoiding a ReferenceError when building the return string), related to frontend issue home-assistant/frontend#30048.
Changes:
- Define
const elementIdin the injected JS and pass it intofindElementInShadowDOM(...). - Simplify the “not found” return path to a single return statement.
- Minor JS iteration style change (
for (const el of ...)).
Sources/App/Frontend/ExternalMessageBus/WebViewExternalMessageHandler.swift
Show resolved
Hide resolved
bgoncal
approved these changes
Mar 23, 2026
Member
|
@wendevlin It's not really needed I guess, it was more a debug thing, I will remove it |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4442 +/- ##
======================================
Coverage ? 0
======================================
Files ? 0
Lines ? 0
Branches ? 0
======================================
Hits ? 0
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
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.
Summary
Screenshots
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes