From d692a1858b544c34f171ba9b24847af8799022f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Mang?= Date: Mon, 23 Jul 2018 09:07:13 +0200 Subject: [PATCH] fix: use queryselector to remove dragover class --- htdocs/js/mpd.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/js/mpd.js b/htdocs/js/mpd.js index 8b7128d..dae10cc 100644 --- a/htdocs/js/mpd.js +++ b/htdocs/js/mpd.js @@ -292,7 +292,7 @@ function appInit() { domCache.progressBar.value = 0; domCache.progressBar.addEventListener('change', function(event) { - if(current_song && current_song.currentSongId >= 0) { + if (current_song && current_song.currentSongId >= 0) { var seekVal = Math.ceil(current_song.totalTime * (domCache.progressBar.value / 100)); sendAPI({"cmd": "MPD_API_SET_SEEK", "data": {"songid":current_song.currentSongId,"seek": seekVal}}); } @@ -408,7 +408,7 @@ function appInit() { document.getElementById(event.dataTransfer.getData('Text')).remove(); dragEl.style.display = ''; queueBody.insertBefore(dragEl, event.target.parentNode); - var tr = queueBody.getElementsByTagName('tr'); + var tr = queueBody.querySelectorAll('.dragover'); var trLen = tr.length; for (var i = 0; i < trLen; i++) { tr[i].classList.remove('dragover');