From 6c12610616ec0f8fa0c2907622fa26095c70b4e6 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Tue, 16 Jul 2019 22:38:03 +0200 Subject: musiclist should render as a listbox now instead of a dropdown depends on the device, desktop browsers usually do that automatically --- webAO/client.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'webAO/client.js') diff --git a/webAO/client.js b/webAO/client.js index b06283b..a653ef3 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -1356,6 +1356,13 @@ function resetICParams() { export function musiclist_click(_event) { const playtrack = document.getElementById("client_musiclist").value; client.sendMusicChange(playtrack); + + // This is here so you can't actually select multiple tracks, + // even though the select tag has the multiple option to render differently + let musiclist_elements = document.getElementById("client_musiclist").selectedOptions; + for(let i = 0; i < musiclist_elements.length; i++){ + musiclist_elements[i].selected = false; + } } window.musiclist_click = musiclist_click; -- cgit