fix: reader header auto-hide, keyboard null guard, active thumb box-shadow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-20 12:15:17 -04:00
parent 774ec635c7
commit bf7d528917
2 changed files with 8 additions and 4 deletions
+6 -2
View File
@@ -2,7 +2,7 @@
'use strict'; 'use strict';
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
const { startPage, totalPages } = window.readerConfig || { startPage: 1, totalPages: 1 }; const { startPage } = window.readerConfig || { startPage: 1 };
// Elements // Elements
// #readerContent is the actual scroll container (overflow-y: auto) // #readerContent is the actual scroll container (overflow-y: auto)
@@ -122,7 +122,10 @@ document.addEventListener('DOMContentLoaded', () => {
} }
// Show header on mouse move // Show header on mouse move
document.addEventListener('mousemove', showHeader); document.addEventListener('mousemove', () => {
showHeader();
scheduleHideHeader();
});
// ------------------------- // -------------------------
// Jump to page // Jump to page
@@ -185,6 +188,7 @@ document.addEventListener('DOMContentLoaded', () => {
// ------------------------- // -------------------------
document.addEventListener('keydown', (e) => { document.addEventListener('keydown', (e) => {
if (e.target.tagName === 'INPUT' || e.target.tagName === 'SELECT') return; if (e.target.tagName === 'INPUT' || e.target.tagName === 'SELECT') return;
if (!readerContent) return;
showHeader(); showHeader();
switch (e.key) { switch (e.key) {
+2 -2
View File
@@ -2542,6 +2542,7 @@ body.select-mode .gallery-infinite-container {
position: relative; position: relative;
border-radius: 6px; border-radius: 6px;
overflow: hidden; overflow: hidden;
transition: opacity 0.2s ease;
cursor: pointer; cursor: pointer;
border: 2px solid transparent; border: 2px solid transparent;
transition: all 0.2s ease; transition: all 0.2s ease;
@@ -2636,12 +2637,11 @@ body.select-mode .gallery-infinite-container {
/* Active nav thumbnail */ /* Active nav thumbnail */
.reader-nav-thumb.active { .reader-nav-thumb.active {
border-left: 3px solid var(--btn-primary); box-shadow: inset 3px 0 0 var(--btn-primary);
opacity: 1; opacity: 1;
} }
.reader-nav-thumb:not(.active) { .reader-nav-thumb:not(.active) {
opacity: 0.5; opacity: 0.5;
transition: opacity 0.2s ease;
} }
.reader-nav-thumb:hover { .reader-nav-thumb:hover {
opacity: 1; opacity: 1;