postlund / search-card

Quickly search for entities from a Lovelace card.
MIT License
104 stars 13 forks source link

search field loosing focus #20

Closed tht closed 4 years ago

tht commented 4 years ago

I absolutely love the idea behind the search-card, so I included it in my Home-Assistant 0.108 installation. I moved to 0.109.2 today and see the same issue. Tested using search-card 4bc0ab8.

When I open the Lovelace UI there is the input field waiting. I click in it to set the keyboard focus and start typing. When entering the first letter it shows up in the textfield and the found entries appear below for a fraction of a second. Then the keyboard focus is lost again and the input field empty. I have to click a second time in the input field - this time it works as expected.

Testes using Safari on macOS and also the Chromium based Brave browser. Also tested in the iOS companion app. All three behave the same. I've put the search-card on an empty view, same issue there. So I assume no conflict with another card.

This is how the search-card is configured:

      - type: custom:search-card
        max_results: 10

Do others experience the same issue? Or is it a conflict with another plugin I installed?

Thanks for looking into this.

m1ke-hub commented 4 years ago

Same happening here since a few weeks (or months?) (0.109.2 - Chrome, Android & iOS App)

I haven't seen any complaints online, so I assumed to have made a mistake or as you suggested a conflicting plugin.

tht commented 4 years ago

Thanks for your feedback. Good to know I'm not the only one.

If you are interested, here the list of all my plugins. "Custom Header" could be an issue, the others are most likely ok.

image


Update: Looks like I'm completely wrong. Just disabled all the plugins except for search-card and the issue remains the same.

postlund commented 4 years ago

I see this issue as well, but I'm not really sure why the problem is (javascript is not really my strongest suit). So if anyone has an idea, feel free me to send a PR to fix it.

m1ke-hub commented 4 years ago

Hey guys, I installed 0.110.1 today and think this bug seems to be gone? 10 tests, 0 fails 👍

postlund commented 4 years ago

Yeah, seems to work fine for me as well! 👍

tht commented 4 years ago

Same here… 0.110.1 seems to have fixed it. But it broke Compact Headers for me – a different story :).

m1ke-hub commented 4 years ago

@tht conversation: in configuration.yaml fixed the header for me :)

rjmcfadd commented 2 months ago

Since the last home assistant update (2024.07) this search field loses focus after typing in the first letter.