frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Wrong tab highlighted when opening Entity settings card

Open kpine opened this issue 2 years ago • 4 comments

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

  1. Open the Entity settings card for any entity (i.e. from the Device page)
  2. Select the "Related" tab
  3. Close the card
  4. Open the Entity settings card again
  5. 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): image

Here's an example screenshot after immediately opening the Entity settings care after closing it (Step 6): image

Also reproduced with Firefox 99.0.1.

Also reproduced in 2022.5.0b4 with frontend 20220429.0.

kpine avatar Apr 30 '22 06:04 kpine

I should be able to fix this

steverep avatar May 04 '22 00:05 steverep

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.

steverep avatar May 04 '22 13:05 steverep

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.

github-actions[bot] avatar Aug 02 '22 14:08 github-actions[bot]

Still an issue.

kpine avatar Aug 02 '22 14:08 kpine

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.

github-actions[bot] avatar Nov 06 '22 20:11 github-actions[bot]

Still an issue

steverep avatar Nov 06 '22 22:11 steverep

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.

kpine avatar Nov 06 '22 22:11 kpine

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.

steverep avatar Nov 06 '22 23:11 steverep

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.

github-actions[bot] avatar Nov 01 '23 02:11 github-actions[bot]

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.

github-actions[bot] avatar Jan 30 '24 04:01 github-actions[bot]