aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--resources/index.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/resources/index.html b/resources/index.html
index c9d5f9e..deb28a8 100644
--- a/resources/index.html
+++ b/resources/index.html
@@ -81,8 +81,9 @@
async function play(id) {
await vlcCommand(`play/${id}`);
- document.querySelector('#vlc-controls').open=true;
- document.location.hash='#vlc-controls';
+ const controls = document.querySelector('#vlc-controls');
+ controls.open=true;
+ controls.scrollIntoView(true);
}
const filesOpenAbort = new AbortController();
@@ -112,7 +113,9 @@
async function browseTo(id) {
filesOpenAbort.abort();
- document.querySelector('#files').open=true;
+ const filesElem = document.querySelector('#files');
+ filesElem.open=true;
+ filesElem.scrollIntoView(true);
document.querySelector('#file-search').value='';
const fileList = document.querySelector('ul#file-list');
const pathList = document.querySelector('ul#path-list');
@@ -130,7 +133,6 @@
});
});
pathList.replaceChildren(...pathItems);
- document.location.hash = '#files';
}
async function loadRecent() {