fix: arrow key nav (left/right modifiers) + opacity class not clearing on retag

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-21 21:26:15 +02:00
parent 14845f47ac
commit 1c5526c56c
@@ -5,8 +5,8 @@
@keydown.s.window="tagFocused('story')" @keydown.s.window="tagFocused('story')"
@keydown.x.window="tagFocused('skip')" @keydown.x.window="tagFocused('skip')"
@keydown.space.prevent.window="tagFocused('skip')" @keydown.space.prevent.window="tagFocused('skip')"
@keydown.arrowleft.prevent.window="navigate(-1)" @keydown.left.prevent.window="navigate(-1)"
@keydown.arrowright.prevent.window="navigate(1)"> @keydown.right.prevent.window="navigate(1)">
<div class="flex items-center justify-between mb-4"> <div class="flex items-center justify-between mb-4">
<h1 class="text-xl font-bold">Triage</h1> <h1 class="text-xl font-bold">Triage</h1>
@@ -175,8 +175,8 @@ function triageApp(albumId) {
el.dataset.tag = tag; el.dataset.tag = tag;
// Remove any existing border/opacity classes before adding new ones // Remove any existing border/opacity classes before adding new ones
el.className = el.className el.className = el.className
.split(' ') .split(/\s+/)
.filter(c => !c.startsWith('border-') && c !== 'opacity-40') .filter(c => c && !c.startsWith('border-') && c !== 'opacity-40')
.join(' '); .join(' ');
if (tag === 'journal') { if (tag === 'journal') {
el.classList.add('border-success'); el.classList.add('border-success');