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';
document.addEventListener('DOMContentLoaded', () => {
const { startPage, totalPages } = window.readerConfig || { startPage: 1, totalPages: 1 };
const { startPage } = window.readerConfig || { startPage: 1 };
// Elements
// #readerContent is the actual scroll container (overflow-y: auto)
@@ -122,7 +122,10 @@ document.addEventListener('DOMContentLoaded', () => {
}
// Show header on mouse move
document.addEventListener('mousemove', showHeader);
document.addEventListener('mousemove', () => {
showHeader();
scheduleHideHeader();
});
// -------------------------
// Jump to page
@@ -185,6 +188,7 @@ document.addEventListener('DOMContentLoaded', () => {
// -------------------------
document.addEventListener('keydown', (e) => {
if (e.target.tagName === 'INPUT' || e.target.tagName === 'SELECT') return;
if (!readerContent) return;
showHeader();
switch (e.key) {