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

切换页签时重新搜索 #2

Closed
TCOTC opened this issue Mar 27, 2024 · 6 comments
Closed

切换页签时重新搜索 #2

TCOTC opened this issue Mar 27, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@TCOTC
Copy link
Owner

TCOTC commented Mar 27, 2024

切换文档时,上一篇搜索结果残留。点击上下搜索按钮,跳动的还是上一篇文档的个结果数。

https://ld246.com/article/1711458701773/comment/1711498861397#comments

@TCOTC TCOTC self-assigned this Mar 27, 2024
@TCOTC TCOTC added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Mar 27, 2024
@TCOTC
Copy link
Owner Author

TCOTC commented Mar 27, 2024

切换文档时再次搜索,索引计数要归零

TCOTC added a commit that referenced this issue Mar 27, 2024
@TCOTC
Copy link
Owner Author

TCOTC commented Mar 27, 2024

bbea597 没用,注释掉了

@TCOTC TCOTC changed the title 切换文档时再次搜索 切换页签时重新搜索 Mar 27, 2024
TCOTC added a commit that referenced this issue Mar 27, 2024
TCOTC added a commit that referenced this issue Mar 27, 2024
上个代码不行,换一个
@TCOTC
Copy link
Owner Author

TCOTC commented Mar 27, 2024

可能有效的思路:

提取 .layout-tab-container > div:not(.fn__none) 元素的 data-id 属性值。

增加一个4秒循环的计时器,每4秒提取一次,从第二次开始,将每次的执行结果与前一次对比,如果两次得到的 data Id 一致则不操作,如果两次得到的 data Id 不一致,则执行 highlightHitResult() 函数。

@TCOTC
Copy link
Owner Author

TCOTC commented Mar 27, 2024

不会做,不做了。切换页签之后点一下箭头就行了

@TCOTC TCOTC closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2024
@TCOTC
Copy link
Owner Author

TCOTC commented Mar 28, 2024

参考 siyuan-note/siyuan#9454siyuan-note/siyuan#10766 ,监听名为 "switch-protyle" 的事件

@TCOTC TCOTC reopened this Mar 28, 2024
TCOTC added a commit that referenced this issue Mar 28, 2024
TCOTC added a commit that referenced this issue Mar 28, 2024
TCOTC added a commit that referenced this issue Mar 28, 2024
TCOTC added a commit that referenced this issue Mar 28, 2024
TCOTC added a commit that referenced this issue Mar 28, 2024
TCOTC added a commit that referenced this issue Mar 28, 2024
@TCOTC
Copy link
Owner Author

TCOTC commented Mar 28, 2024

还是不懂

@TCOTC TCOTC closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant