From ee17b5dbdf62c4ecadf0620a298468cc624cf01e Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sun, 30 Nov 2025 10:53:21 -0500 Subject: [PATCH] Fix interlinear tooltip toggles and align theme colors --- kjvstudy_org/templates/chapter_interlinear.html | 5 +++++ kjvstudy_org/templates/verse.html | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/kjvstudy_org/templates/chapter_interlinear.html b/kjvstudy_org/templates/chapter_interlinear.html index 6636bfa..ad8e757 100644 --- a/kjvstudy_org/templates/chapter_interlinear.html +++ b/kjvstudy_org/templates/chapter_interlinear.html @@ -775,6 +775,11 @@ document.addEventListener('click', function(e) { function expandSelectedWord() { const words = getWordsInVerse(selectedVerseIndex); if (selectedWordIndex >= 0 && selectedWordIndex < words.length) { + document.querySelectorAll('.word-unit.expanded').forEach(function(word) { + if (word !== words[selectedWordIndex]) { + word.classList.remove('expanded'); + } + }); toggleWord(words[selectedWordIndex]); } } diff --git a/kjvstudy_org/templates/verse.html b/kjvstudy_org/templates/verse.html index 7d1e30c..5e9825f 100644 --- a/kjvstudy_org/templates/verse.html +++ b/kjvstudy_org/templates/verse.html @@ -965,6 +965,11 @@ e.preventDefault(); // Toggle word expansion if (selectedWordIndex >= 0 && words[selectedWordIndex]) { + document.querySelectorAll('.word-unit.expanded').forEach(function(word) { + if (word !== words[selectedWordIndex]) { + word.classList.remove('expanded'); + } + }); words[selectedWordIndex].classList.toggle('expanded'); } }