From bf980f7b3e4704daf5b42c580a8feca0589c1b00 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Fri, 12 Dec 2025 16:50:10 +0100 Subject: [PATCH] deselect track on put --- modules/web.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/web.html b/modules/web.html index 5d14389..daca1a8 100644 --- a/modules/web.html +++ b/modules/web.html @@ -371,6 +371,8 @@ // Priority 1: Check for a selected file in the subdirectory list if (selectedSubFile && selectedDir) { fullPath = subbasePath.replace(/\/$/, '') + '/' + selectedSubFile; + Array.from(document.getElementById("subdir-box").children).forEach(c => c.classList.remove("selected")); + selectedSubFile = null; } else { // Priority 2: Check for a selected file in the main directory list const dirEls = document.getElementById("dirs-box").children; @@ -381,6 +383,8 @@ // A simple check to see if the selected item is a file if (name.includes('.')) { fullPath = basePath.replace(/\/$/, '') + '/' + name; + Array.from(dirEls).forEach(c => c.classList.remove("selected")); + selectedDir = null; } } }