Skip to content

Commit

Permalink
Merge pull request tangly1024#2711 from tangly1024/release/4.7.0
Browse files Browse the repository at this point in the history
OpenWrite解锁文章高度调整
  • Loading branch information
tangly1024 committed Sep 6, 2024
2 parents 9e76e61 + 498e8d0 commit c2c8501
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/OpenWrite.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ const OpenWrite = () => {
// btw初始化后,开始监听read-more-wrap何时消失
const intervalId = setInterval(() => {
const readMoreWrapElement = document.getElementById('read-more-wrap')
const articleWrapElement = document.getElementById('article-wrapper')

if (!readMoreWrapElement) {
if (!readMoreWrapElement && articleWrapElement) {
toggleTocItems(false) // 恢复目录项的点击
// 自动调整文章区域的高度
articleWrapElement.style.height = 'auto'
// 停止定时器
clearInterval(intervalId)
}
Expand Down

0 comments on commit c2c8501

Please sign in to comment.