Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python

Remove the watch(audioPlayerPosition) that referenced the ref before its declaration line — caused a TDZ ReferenceError at setup time and was redundant anyway because a top↔bottom player swap also changes the height of #mainContentColumns (the player moves from one end of the flex column to the other), and the ResizeObserver attached earlier already catches that height change and bumps chatLayoutTick

Murtaza Nasir43cf376f6d4c
diff --git a/static/js/app.modular.js b/static/js/app.modular.js
index fd775fbf..2cd3bf8d 100644
--- a/static/js/app.modular.js
+++ b/static/js/app.modular.js
@@ -968,16 +968,11 @@ document.addEventListener('DOMContentLoaded', async () => {
}
}, { immediate: false });
- // The Display tab lets users flip the audio player between
- // top and bottom of the detail screen. That repositions
- // #mainContentColumns (it grows/shrinks vertically and its
- // top edge changes). The ResizeObserver above catches the
- // SIZE change; this watch catches even the case where only
- // the top edge changes (e.g. layout swap), and is also a
- // useful explicit signal for debugging.
- watch(audioPlayerPosition, () => {
- nextTick(_bumpChatLayout);
- });
+ // Note: a top↔bottom player swap also changes the height of
+ // #mainContentColumns (because the player occupies space on
+ // a different side of the flex column), so the
+ // ResizeObserver above is the only handler needed for that
+ // case. No explicit watch on audioPlayerPosition required.
// --- Audio Player State (Main Player) ---
const playerVolume = ref(1.0);