fix: overflow-x-hidden 改为 overflow-x:clip 修复 sticky 吸顶

overflow-x:hidden 会创建滚动容器导致 position:sticky 失效,
改用 overflow-x:clip 裁剪溢出但不破坏 sticky 定位。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-04-02 00:15:38 +08:00
parent c5ee78e892
commit 787fa27949
3 changed files with 3 additions and 3 deletions

View File

@@ -62,7 +62,7 @@ export default function StatisticsView() {
}, [selectedTargetId]);
return (
<div className="space-y-2 pb-2 landscape:pb-4 landscape:h-full landscape:overflow-hidden landscape:flex landscape:flex-col flex-none landscape:flex-1 overflow-x-hidden">
<div className="space-y-2 pb-2 landscape:pb-4 landscape:h-full landscape:overflow-hidden landscape:flex landscape:flex-col flex-none landscape:flex-1" style={{ overflowX: 'clip' }}>
{/* Project Selector - Full width even in landscape */}
<div className="bg-white landscape:bg-slate-900/50 landscape:border-slate-800 p-2 rounded-2xl shadow-sm border border-slate-100 flex gap-1 overflow-x-auto no-scrollbar flex-shrink-0">
{targets.map(target => (