kalkih / mini-media-player

Minimalistic media card for Home Assistant Lovelace UI
MIT License
1.49k stars 205 forks source link

Dropdown (source/sound/shorcuts) not always expanding #624

Closed 03397 closed 2 years ago

03397 commented 2 years ago

Guys in relation with issue 606, this solves the issue for me but sometimes it is not responding, doing nothing and it is giving me error saying https://xxxxxxxxxzzzz/hacsfiles/mini-media-player/mini-media-player-bundle.js?hacstag=1485208381160:1:154147 Uncaught SyntaxError: Failed to execute 'querySelector' on 'DocumentFragment': '#9bpap80z7-menu' is not a valid selector.

kalkih commented 2 years ago

Does this happen other than when switching in and out of the UI editor?

03397 commented 2 years ago

It just happens when I just hit the arrow to bring the list. But randomly as I said

This is the actual setup I have if it is related. cards:

sdotter commented 2 years ago

Guys in relation with issue 606, this solves the issue for me but sometimes it is not responding, doing nothing and it is giving me error saying https://xxxxxxxxxzzzz/hacsfiles/mini-media-player/mini-media-player-bundle.js?hacstag=1485208381160:1:154147 Uncaught SyntaxError: Failed to execute 'querySelector' on 'DocumentFragment': '#9bpap80z7-menu' is not a valid selector.

I experienced the same thing... cleared cache etc. Happens sometimes.... Some more info: toggle open/close dropdown doenst work when error... without error everyting works well... some sync / async stuff?

Nevertheless: compliments for developer for quick update and awesome module!

mini-media-player-bundle.js:1 Uncaught (in promise) DOMException: Failed to execute 'querySelector' on 'DocumentFragment': '#8eo551tco-menu' is not a valid selector.
    at ec.firstUpdated (https://rpi-hassio/local/modules/mini-media-player/mini-media-player-bundle.js:1:153520)
    at ec.performUpdate (https://rpi-hassio/local/modules/mini-media-player/mini-media-player-bundle.js:1:131322)
    at https://rpi-hassio/local/modules/mini-media-player/mini-media-player-bundle.js:1:130872
    at Generator.next (<anonymous>)
    at cb (https://rpi-hassio/local/modules/mini-media-player/mini-media-player-bundle.js:1:48215)
    at f (https://rpi-hassio/local/modules/mini-media-player/mini-media-player-bundle.js:1:48399)
kalkih commented 2 years ago

Thanks for the details. The reference to themenu is set after the first render of the dropdown, the menu element is proably unmounted/remounted in the DOM which breaks the reference.

Will fix tonight.

sdotter commented 2 years ago

Niceee!! Thanks! (I've paid you a beer... cheers! :p)

marph-DE commented 2 years ago

Fix dropdown would be nice, Thanks

kongo09 commented 2 years ago

Not sure if this is related, but the dropdown also positions itself under the next widget instead of above:

image

There is a third invisible entry under the covers.

sdotter commented 2 years ago

Not sure if this is related, but the dropdown also positions itself under the next widget instead of above:

image

There is a third invisible entry under the covers.

I think that was already fixed in v1.16.0?

kalkih commented 2 years ago

Fixed in latest release