Skip to content

Commit 1a153cf

Browse files
authored
feat: 支持 Cherry Markdown 阅读页目录滚动功能 (#1028)
* 在函数开头添加输入元素检测,当焦点在输入框、textarea、select 或可编辑元素中时,直接返回不执行快捷键操作 * feat: 支持 Cherry Markdown 阅读页目录滚动功能 - 为 Cherry 编辑器阅读模式的目录添加最大高度限制 - 当目录过长时支持垂直滚动查看后续条目 - 使用 calc(100vh - 180px) 动态计算合适的滚动容器高度 - 启用 webkit 平滑滚动以改善移动端体验
1 parent bec1763 commit 1a153cf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

views/document/cherry_read.tpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@
5050
display: none;
5151
}
5252
}
53+
54+
.m-manual.manual-reader .manual-article.cherry-markdown .article-body .toc {
55+
max-height: calc(100vh - 180px);
56+
overflow-y: auto;
57+
overflow-x: hidden;
58+
-webkit-overflow-scrolling: touch;
59+
}
5360
</style>
5461
</head>
5562
<body>

0 commit comments

Comments
 (0)