diff --git a/assets/js/filebrowser.js b/assets/js/filebrowser.js index 5c9b23c..41bb1b7 100644 --- a/assets/js/filebrowser.js +++ b/assets/js/filebrowser.js @@ -105,9 +105,8 @@ // portfolio-index rows are real links (data-img + href together) — a // single click there used to jump straight into the project, which // meant hovering was the only way to preview a different one first. - // now the first click just locks it (no navigation); only a second - // click on the already-locked row, or the preview image itself, - // actually navigates. + // now a click just locks/unlocks it like any other row; the preview + // image is the dedicated way to actually navigate in. var isProjectLink = a.hasAttribute("href") && a.hasAttribute("data-img"); a.addEventListener("mouseenter", function () { if (locked < 0) { hidePeek(); render(i); } // nothing locked — hover drives the main preview, like before locking existed @@ -115,16 +114,9 @@ else hidePeek(); }); a.addEventListener("click", function (e) { - if (isProjectLink) { - if (locked === i) return; // already locked — let the link through - e.preventDefault(); - lock(i); - render(i, true); - hidePeek(); - return; - } - if (a.getAttribute("href")) return; // ".." navigates normally - e.preventDefault(); + if (isProjectLink) e.preventDefault(); // never navigate from the row itself + else if (a.getAttribute("href")) return; // ".." navigates normally + else e.preventDefault(); if (locked === i) { unlock(); ghostClear(); } else { lock(i); render(i, true); } hidePeek();