From bad2cb6c7ae9f5337cb0b2d8565c7832e6bafb1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=AD=96?= <1055104544@qq.com> Date: Thu, 26 Mar 2026 18:06:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=9B=AE=E5=BD=95=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E4=BA=8B=E4=BB=B6=E9=98=BB=E6=AD=A2=E5=86=92?= =?UTF-8?q?=E6=B3=A1=EF=BC=8C=E9=98=B2=E6=AD=A2=E8=A7=A6=E5=8F=91=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E5=8C=BA=E5=9F=9F=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alacarte-novel-website/reader.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/alacarte-novel-website/reader.html b/alacarte-novel-website/reader.html index 07db79a..5917ac1 100644 --- a/alacarte-novel-website/reader.html +++ b/alacarte-novel-website/reader.html @@ -622,6 +622,25 @@ } }); + // 阻止目录弹窗的滚动事件冒泡到页面 + const tocList = document.getElementById('tocList'); + tocList.addEventListener('wheel', (e) => { + e.stopPropagation(); + }, { passive: true }); + + tocList.addEventListener('touchmove', (e) => { + e.stopPropagation(); + }, { passive: true }); + + // 阻止弹窗内容区域的滚动冒泡 + document.querySelector('.toc-content').addEventListener('wheel', (e) => { + e.stopPropagation(); + }, { passive: true }); + + document.querySelector('.toc-content').addEventListener('touchmove', (e) => { + e.stopPropagation(); + }, { passive: true }); + // 初始化 - 等待app.js加载章节数据 document.addEventListener('DOMContentLoaded', async function() { // 等待章节数据加载完成