frontend
frontend copied to clipboard
Wrong tab highlighted when opening Entity settings card
Checklist
- [X] I have updated to the latest available Home Assistant version.
- [X] I have cleared the cache of my browser.
- [X] I have tried a different browser to see if it is related to my browser.
Describe the issue you are experiencing
When opening the Entity settings, the "Settings" tab will be highlighted even if the "Related" tab is focused. This occurs after selecting "Related", closing the card, and re-opening it.
Describe the behavior you expected
The visible tab should be highlighted, as if it was clicked on and selected.
Steps to reproduce the issue
- Open the Entity settings card for any entity (i.e. from the Device page)
- Select the "Related" tab
- Close the card
- Open the Entity settings card again
- Notice that the "Related" tab is still selected and visible, but the "Settings" tab is highlighted
What version of Home Assistant Core has the issue?
core-2022.4.7
What was the last working version of Home Assistant Core?
No response
In which browser are you experiencing the issue with?
Google Chrome 101.0.4951.41
Which operating system are you using to run this browser?
Windows 10
State of relevant entities
No response
Problem-relevant frontend configuration
No response
Javascript errors shown in your browser console/inspector
No response
Additional information
Here's an example screenshot after selecting the "Related" tab, and before closing the card (Step 2):
Here's an example screenshot after immediately opening the Entity settings care after closing it (Step 6):
Also reproduced with Firefox 99.0.1.
Also reproduced in 2022.5.0b4 with frontend 20220429.0.
I should be able to fix this
This and other dialogs with tab bars are set to give initial focus to the first tab, which is not necessarily the active tab (although in most cases it is).
After investigating and jogging my memory, this is a limitation of the mwc-tab-bar
component. I filed issue material-components/material-web#3396 to hopefully get that added and then this would be an easy fix.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Still an issue.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Still an issue
I think this issue has become obsolete. Somewhere between 20220816.0 and 20220831.0 (20220816.0 has this problem, but 0831.0 does not) the entity card no longer remembers which tab was chosen last. It always starts in the "Info" tab, and it is highlighted.
You're right, but the problem could easily pop up again because of the dependency issue. The focused tab and selected tab are not programmatically synced. We're just lucky they are the same now.
Let's keep this open until it's not fixed by accident.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.