From f6c573ece09fce95a2c81341cc2a0768534e7c22 Mon Sep 17 00:00:00 2001 From: Tuomas Airaksinen Date: Wed, 1 Jan 2025 18:45:34 +0200 Subject: [PATCH] Fix verse-notifier (when reading direction is changed) --- app/bibleview-js/src/composables/verse-notifier.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/bibleview-js/src/composables/verse-notifier.ts b/app/bibleview-js/src/composables/verse-notifier.ts index d30e4b6adb..510bed8086 100644 --- a/app/bibleview-js/src/composables/verse-notifier.ts +++ b/app/bibleview-js/src/composables/verse-notifier.ts @@ -58,10 +58,10 @@ export function useVerseNotifier( // Find element, starting from right let element: Nullable; - let directionChanged = true; - while (directionChanged) { - directionChanged = false; - while (y < window.innerHeight) { + while (y < window.innerHeight) { + let directionChanged = true; + while (directionChanged) { + directionChanged = false; for (const x of iterate(lastDirection)) { element = document.elementFromPoint(x, y) as Nullable if (element) {