From 1a396ee5ab53287870db31b9c817940df84e5777 Mon Sep 17 00:00:00 2001 From: deploy Date: Mon, 9 Nov 2026 14:34:41 +0000 Subject: [PATCH] =?UTF-8?q?v26110905=20=E9=A6=96=E9=A1=B5=E5=9B=9E?= =?UTF-8?q?=E4=BD=8D=EF=BC=9A=E9=94=9A=E7=82=B9=E8=B7=B3=E8=BF=87=E6=B5=AE?= =?UTF-8?q?=E5=B1=82/=E5=90=B8=E9=A1=B6=E5=85=83=E7=B4=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- js/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 798b8d9..bf54d73 100644 --- a/js/app.js +++ b/js/app.js @@ -297,7 +297,8 @@ let a = null, bd = 1e9; sc.querySelectorAll('[id]').forEach(el => { const r = el.getBoundingClientRect(); - if (r.height < 60 || r.bottom <= top) return; + if (r.height < 60 || r.height > sc.clientHeight * 4 || r.bottom <= top) return; + for (let x = el; x && x !== sc; x = x.parentElement) { const ps = getComputedStyle(x).position; if (ps === 'fixed' || ps === 'absolute' || ps === 'sticky') return; } /* 浮层 / 吸顶不跟着滚,不能当锚点 */ const d = Math.abs(r.top - top); if (d < bd) { bd = d; a = { id: el.id, off: r.top - top }; } });