diff options
| author | stonedDiscord <stoned@derpymail.org> | 2019-07-16 22:38:03 +0200 |
|---|---|---|
| committer | stonedDiscord <stoned@derpymail.org> | 2019-07-16 22:38:03 +0200 |
| commit | 6c12610616ec0f8fa0c2907622fa26095c70b4e6 (patch) | |
| tree | 3cc188280f6623e6c77d6a6a1d16e12d4d2a2586 /webAO/client.js | |
| parent | ab960bb1a2a43d19c497acb2590ff88c0b82d151 (diff) | |
musiclist should render as a listbox now instead of a dropdown
depends on the device, desktop browsers usually do that automatically
Diffstat (limited to 'webAO/client.js')
| -rw-r--r-- | webAO/client.js | 7 |
1 files changed, 7 insertions, 0 deletions
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; |
