diff --git a/spike/review/reinvent/ezmded/ui/index.html b/spike/review/reinvent/ezmded/ui/index.html index 075353c..78fc783 100644 --- a/spike/review/reinvent/ezmded/ui/index.html +++ b/spike/review/reinvent/ezmded/ui/index.html @@ -200,7 +200,7 @@ //drawFile(id) document.getElementById("saveFeedback").innerHTML = "success!" if (saveFeedbackInterval) { - clearInterval(saveFeedbackInterval) + clearTimeout(saveFeedbackInterval) } saveFeedbackInterval = setTimeout(() => {document.getElementById("saveFeedback").innerHTML = ""}, 5000) }, body, headers) @@ -236,6 +236,8 @@ document.getElementById("searchResults").className = ""; } + var liveLeafTimeout = null + function setMDE(id, title, body) { if (id[0] == "/") id = id.slice(1, id.length) @@ -265,7 +267,9 @@ for (var i in previouslyHighlighted) if (previouslyHighlighted && previouslyHighlighted[i] && previouslyHighlighted[i].classList) previouslyHighlighted[i].classList.remove("live_leaf") - setTimeout(() => { + if (liveLeafTimeout) + clearTimeout(liveLeafTimeout) + liveLeafTimeout = setTimeout(() => { const toHighlight = document.getElementsByClassName(btoa("/"+id)) for (var i = 0; i < toHighlight.length; i++) { if (toHighlight && toHighlight[i] && toHighlight[i].classList)