Made the player root element focusable

This makes keyboard actions work reliably in the entire element.
Using -1 ensures it does not interfere with tab navigation.
This commit is contained in:
Erik Thuning 2025-02-06 14:29:53 +01:00
parent 77151ceef8
commit 2be04e1e79

@ -1027,7 +1027,8 @@ input[type="range"]::-ms-track {
this.shadowRoot.appendChild(icons.content.cloneNode(true));
// initialize player skeleton
this._root = createElement('div', {'id': 'player-root'});
this._root = createElement('div', {'id': 'player-root',
'tabindex': -1});
this._viewport = this._root.createChild('div', {'id': 'viewport'});
const sidebar = this._root.createChild(