fix: about-page text preview responds to hover again while a file is locked

the peek column only exists for images (a side-by-side thumbnail makes sense there, not for text) — but the mouseenter handler routed ALL rows through the locked/peek branch once something was locked, so on about (all text rows, locked by default on load) hovering dossier.md/openbureau.md/rapport.md while cv.md was locked did nothing at all. rows without data-img now always drive the main preview directly on hover, lock or not.
This commit is contained in:
kgva CMS
2026-08-15 00:19:05 +00:00
parent aa33ce56bf
commit b665293922
+4 -1
View File
@@ -109,7 +109,10 @@
// image is the dedicated way to actually navigate in. // image is the dedicated way to actually navigate in.
var isProjectLink = a.hasAttribute("href") && a.hasAttribute("data-img"); var isProjectLink = a.hasAttribute("href") && a.hasAttribute("data-img");
a.addEventListener("mouseenter", function () { a.addEventListener("mouseenter", function () {
if (locked < 0) { hidePeek(); render(i); } // nothing locked — hover drives the main preview, like before locking existed // the peek column only exists for images — text/video rows (like on
// about) have no equivalent, so they always drive the main preview
// directly, lock or no lock, same as before locking existed
if (locked < 0 || !a.hasAttribute("data-img")) { hidePeek(); render(i); }
else if (i !== locked) showPeek(a); else if (i !== locked) showPeek(a);
else hidePeek(); else hidePeek();
}); });