Skip to content

切换主题的时候通过 theme.js 增加的元素不会被清除 #3927

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

Closed
lisontowind opened this issue Jan 25, 2022 · 3 comments
Closed
Assignees
Milestone

Comments

@lisontowind
Copy link

切换主题的时候通过theme.js增加的元素不会被清除
设定暗主题是roundark的时候,亮主题为原始主题,不断切换主题时,用theme.js增加的元素不会被清除,会反复叠加,导致其他主题错误
微信图片_20220125193523

@88250
Copy link
Member

88250 commented Jan 25, 2022

界面不刷新的话添加的 DOM 元素以及其他状态(比如变量)是不会清除的,如果刷新界面的话似乎对用户不太友好。你认为应该如何处理呢?

@leolee9086
Copy link

检查当前主题是否带有theme.js 提示当前主题在切换时会需要刷新界面? 用户有预期的话应该会好一些.

@88250
Copy link
Member

88250 commented Jan 25, 2022

@leolee9086 目前看来似乎只有这个方案比较妥当 👍

@88250 88250 self-assigned this Jan 25, 2022
@88250 88250 added this to the 1.8.0 milestone Jan 25, 2022
@88250 88250 changed the title 切换主题的时候通过theme.js增加的元素不会被清除 切换主题的时候通过 theme.js 增加的元素不会被清除 Jan 25, 2022
@88250 88250 modified the milestones: 1.8.0, backlog, 1.7.9 Jan 26, 2022
88250 added a commit to siyuan-note/appearance that referenced this issue Jan 27, 2022

Unverified

This user has not yet uploaded their public signing key.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants