Fix: Remove Scroll Propagation in Reader (#63)

This commit is contained in:
Youwes09
2026-05-02 18:06:37 -05:00
parent 5451a2654b
commit 3f6049c12d
2 changed files with 29 additions and 9 deletions
@@ -86,6 +86,7 @@
}); });
export function onInspectMouseDown(e: MouseEvent) { export function onInspectMouseDown(e: MouseEvent) {
if ((e.target as Element).closest(".bar")) return;
if (style === "longstrip") { if (style === "longstrip") {
stripDragging = true; stripDragging = true;
stripDragMoved = false; stripDragMoved = false;
@@ -126,6 +127,7 @@
} }
export function onPointerDown(e: PointerEvent) { export function onPointerDown(e: PointerEvent) {
if ((e.target as Element).closest(".bar")) return;
pinch?.onPointerDown(e); pinch?.onPointerDown(e);
} }
@@ -142,12 +142,18 @@
{#if isVertical} {#if isVertical}
<span class="ch-info">&#xE2CE;</span> <span class="ch-info">&#xE2CE;</span>
{:else} {:else}
<span class="ch-marquee-track" onwheel={(e) => { e.stopPropagation(); (e.currentTarget as HTMLElement).scrollLeft += e.deltaY; }}>
<span class="ch-marquee-content">
<span class="ch-title">{store.activeManga?.title}</span> <span class="ch-title">{store.activeManga?.title}</span>
<span class="ch-sep">/</span> <span class="ch-sep">/</span>
<span class="ch-name">{displayChapter?.name}</span> <span class="ch-name">{displayChapter?.name}</span>
<span class="ch-page">{store.pageNumber} / {visibleChunkLastPage || "…"}</span> </span>
</span>
{/if} {/if}
</button> </button>
{#if !isVertical}
<span class="ch-page">{store.pageNumber} / {visibleChunkLastPage || "…"}</span>
{/if}
{#if chapterHover && isVertical} {#if chapterHover && isVertical}
<div class="ch-popover ch-popover-{popoverSide}"> <div class="ch-popover ch-popover-{popoverSide}">
@@ -404,15 +410,14 @@
.icon-btn.active { color: var(--accent-fg); } .icon-btn.active { color: var(--accent-fg); }
.marker-btn-has { color: var(--marker-color, var(--accent-fg)) !important; } .marker-btn-has { color: var(--marker-color, var(--accent-fg)) !important; }
.ch-hover-wrap { position: relative; min-width: 0; } .ch-hover-wrap { position: relative; min-width: 0; display: flex; align-items: center; gap: var(--sp-2); }
.ch-pill { .ch-pill {
display: flex; display: flex;
align-items: center; align-items: center;
gap: var(--sp-2);
font-size: var(--text-sm); font-size: var(--text-sm);
color: var(--text-muted); color: var(--text-muted);
overflow-x: auto; overflow: hidden;
white-space: nowrap; white-space: nowrap;
min-width: 0; min-width: 0;
padding: 2px 4px; padding: 2px 4px;
@@ -420,9 +425,7 @@
background: none; background: none;
cursor: default; cursor: default;
transition: background var(--t-fast); transition: background var(--t-fast);
scrollbar-width: none;
} }
.ch-pill::-webkit-scrollbar { display: none; }
.bar-left .ch-pill, .bar-right .ch-pill { .bar-left .ch-pill, .bar-right .ch-pill {
width: 28px; width: 28px;
height: 28px; height: 28px;
@@ -430,6 +433,21 @@
padding: 0; padding: 0;
} }
.ch-info { font-size: 15px; line-height: 1; color: var(--text-faint); flex-shrink: 0; } .ch-info { font-size: 15px; line-height: 1; color: var(--text-faint); flex-shrink: 0; }
.ch-marquee-track {
overflow-x: auto;
min-width: 0;
flex: 1;
scrollbar-width: none;
}
.ch-marquee-track::-webkit-scrollbar { display: none; }
.ch-marquee-content {
display: inline-flex;
align-items: center;
gap: var(--sp-2);
white-space: nowrap;
}
.ch-title { color: var(--text-secondary); font-weight: var(--weight-medium); } .ch-title { color: var(--text-secondary); font-weight: var(--weight-medium); }
.ch-sep { color: var(--text-faint); flex-shrink: 0; } .ch-sep { color: var(--text-faint); flex-shrink: 0; }
.ch-name { color: var(--text-muted); } .ch-name { color: var(--text-muted); }