From 95f45a5f139f046f6d7d7cb7723b679c7164e4c7 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 7 Apr 2026 11:00:58 +0500 Subject: [PATCH] fix: chapter list modal full-screen clip + add clear close button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause: the chapter picker overlay (fixed inset-0) was rendered as a descendant of the AudioPlayer's wrapping div, which is itself inside a 'rounded-b-lg overflow-hidden' container on the chapter page. Chrome clips position:fixed descendants when a parent has overflow:hidden + border-radius, so the overlay was constrained to the parent's bounding box instead of covering the full viewport. Fix: moved the {#if showChapterPanel} block from inside the standard player div to a top-level sibling at the end of the component template. Svelte components support multiple root nodes, so the overlay is now a sibling of all player containers — no ancestor overflow-hidden can clip it. Also replaced the subtle chevron-down close button with a clear X (×) button in the top-right of the header, making it obvious how to dismiss the panel. --- ui/src/lib/components/AudioPlayer.svelte | 149 ++++++++++++----------- 1 file changed, 77 insertions(+), 72 deletions(-) diff --git a/ui/src/lib/components/AudioPlayer.svelte b/ui/src/lib/components/AudioPlayer.svelte index 0060054..f4c471c 100644 --- a/ui/src/lib/components/AudioPlayer.svelte +++ b/ui/src/lib/components/AudioPlayer.svelte @@ -1166,78 +1166,7 @@ {/if} - - {#if showChapterPanel && audioStore.chapters.length > 0} - -
- -
- - Chapters -
- -
-
- - - - -
-
- -
- {#each filteredChapters as ch (ch.number)} - - {/each} - {#if filteredChapters.length === 0} -

No chapters match "{chapterSearch}"

- {/if} -
-
- {/if} + {#if audioStore.isCurrentChapter(slug, chapter)} @@ -1318,3 +1247,79 @@ {/if} {/if} + + +{#if showChapterPanel && audioStore.chapters.length > 0} + +
+ +
+ Chapters + +
+ +
+
+ + + + +
+
+ +
+ {#each filteredChapters as ch (ch.number)} + + {/each} + {#if filteredChapters.length === 0} +

No chapters match "{chapterSearch}"

+ {/if} +
+
+{/if}