fix: use queryselector to remove dragover class

This commit is contained in:
Jürgen Mang 2018-07-23 09:07:13 +02:00 committed by GitHub
parent 4cc4580310
commit d692a1858b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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');