Fix interlinear tooltip toggles and align theme colors

This commit is contained in:
2025-11-30 10:53:21 -05:00
parent 1f892978f8
commit ee17b5dbdf
2 changed files with 10 additions and 0 deletions
@@ -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]);
}
}
+5
View File
@@ -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');
}
}