Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Waline Comment affects page scroll behavior #2814

Closed
6 of 8 tasks
SherryMW opened this issue Feb 21, 2023 · 12 comments
Closed
6 of 8 tasks

[Bug] Waline Comment affects page scroll behavior #2814

SherryMW opened this issue Feb 21, 2023 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@SherryMW
Copy link

Checklist

  • I am using LTS version of Node.js.
  • I am using the latest v2 version of VuePress and VuePress official plugins.
  • I am using the latest v2 version of vuepress-theme-hope and all plugins in this repo.
  • I am following the docs and I am sure I am using the correct configuration.
  • I have searched FAQ

Package name

vuepress-theme-hope

Which operating system are you using?

  • macOS
  • Windows
  • Linux

Describe the bug

在更新到2.0.0-beta.178后,从博客首页访问文章后页面滚动条并不是在最顶部,去除底部评论插件Waline后发现正常。2.0.0-beta.166没有这个问题

Additional context

No response

@SherryMW SherryMW added the bug Something isn't working label Feb 21, 2023
@Mister-Hope Mister-Hope added needs reproduction Reproduction repo or stackblitz link is required and removed bug Something isn't working labels Feb 21, 2023
@github-actions
Copy link

Hello @SherryMW. Please provide a minimal reproduction using a GitHub repository or vuepress-theme-hope.github.io/v2-new. Issues marked with needs reproduction will be closed if they have no activity within 3 days.

@SherryMW
Copy link
Author

补充一下配置文件:
"devDependencies": {
"@vuepress/client": "2.0.0-beta.60",
"@vuepress/plugin-container": "2.0.0-beta.60",
"@vuepress/plugin-docsearch": "2.0.0-beta.60",
"element-plus": "^2.2.32",
"js-yaml": "^4.1.0",
"markdown-it": "13.0.1",
"vue": "^3.2.47",
"vuepress": "2.0.0-beta.60",
"vuepress-theme-hope": "2.0.0-beta.178"
}

@Mister-Hope Mister-Hope added upstream bug Bug comes from upstream, should not be fixed here duplicate This issue or pull request already exists and removed needs reproduction Reproduction repo or stackblitz link is required upstream bug Bug comes from upstream, should not be fixed here labels Feb 21, 2023
@Mister-Hope
Copy link
Member

Should be related to vuepress/core#1252

@Mister-Hope Mister-Hope added upstream bug Bug comes from upstream, should not be fixed here and removed duplicate This issue or pull request already exists labels Feb 21, 2023
@SherryMW
Copy link
Author

我的项目存储库地址是:https://github.com/SherryMW/Blog

@SherryMW
Copy link
Author

应该与 vuepress/vuepress-next#1252 相关

收到

@Mister-Hope
Copy link
Member

Should be fixed in 1bf15b8

@Mister-Hope Mister-Hope reopened this Feb 28, 2023
@Mister-Hope Mister-Hope changed the title [Bug] 从2.0.0-beta.166更新到2.0.0-beta.178后出现的关于滚动条的问题 [Bug] Waline 评论服务会干扰页面滚动 Feb 28, 2023
@Mister-Hope Mister-Hope added bug Something isn't working and removed upstream bug Bug comes from upstream, should not be fixed here labels Feb 28, 2023
@Mister-Hope Mister-Hope changed the title [Bug] Waline 评论服务会干扰页面滚动 [Bug] Waline Comment affects page scroll behavior Feb 28, 2023
@Mister-Hope
Copy link
Member

I am not sure how to fix this, pr welcome

@Mister-Hope Mister-Hope added contribution welcome PR about it is welcomed help wanted Extra attention is needed labels Mar 5, 2023
@OrageKK
Copy link
Contributor

OrageKK commented Apr 19, 2023

@Mister-Hope 我找到了问题出在哪里
vuepress-plugin-comment2/lib/client/components/Waline.js下

await import("@waline/client/dist/component.mjs")).Waline

引用的@waline/client/dist/component.mjs文件中,问题代码在解压缩后的623-626行,注释掉就好了

const n = window.scrollY;
await C(0), window.scrollTo({
    top: n
})

@Mister-Hope
Copy link
Member

Thanks I will review that later

@Mister-Hope
Copy link
Member

Should be fixed in @waline/client@2.15.1, feedback welcomed. @OrageKK @SherryMW

@OrageKK
Copy link
Contributor

OrageKK commented Apr 20, 2023

Theme 205 version has fixed this problem, thank you

@Mister-Hope Mister-Hope removed help wanted Extra attention is needed contribution welcome PR about it is welcomed labels Apr 20, 2023
@OrageKK
Copy link
Contributor

OrageKK commented Jun 6, 2023

@Mister-Hope 最近又出现了这个问题,不过在本地dev没有问题,部署后还是出现了,
我的依赖版本

 "vuepress-theme-hope": "2.0.0-beta.219",
 "@waline/client": "2.15.5"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants