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

启用pjax加载在从首页跳转到首页的情况下,Typed.js重复加载 #810

Closed
kanodaisuki opened this issue Nov 4, 2023 · 4 comments
Labels
bug Something isn't working Stale

Comments

@kanodaisuki
Copy link
Contributor

问题出处:

首页封面签名栏打字特效

实际行为描述:

首页跳转到首页时,Typed.js对象在未销毁的情况下重载

预期的行为:

Sakurairo_Scripts此处,或许应该销毁后重新添加?

复现步骤:

  1. 开启pjax加载
  2. 开启首页封面签名栏打字特效
  3. 在首页点击网站logo,从首页跳转到首页

配置与环境:

  • 主题版本:2.6.3.1

截图(若有)

image

@kanodaisuki kanodaisuki added the bug Something isn't working label Nov 4, 2023
Copy link

github-actions bot commented Nov 4, 2023

@kanodaisuki,感谢你给 sakurairo 提出了 issue。ヾ(≧▽≦*)o
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@KotoriK
Copy link
Collaborator

KotoriK commented Nov 5, 2023

或许在initTypedJs()执行前添加disableTypedJsIfExist()

@kanodaisuki
Copy link
Contributor Author

或许在initTypedJs()执行前添加disableTypedJsIfExist()

或者在initTypedJs()里判断是否已经存在typed对象?防止二次加载。
这样的话,在首页原地跳转时,或许会丝滑一些

Copy link

github-actions bot commented Dec 7, 2023

这个 Issue 已经 30 天没有任何活动了,将被标记为过时 stale。删除 stale 标签或评论,否则将在 7 天内关闭。

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

No branches or pull requests

2 participants