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

Sometimes tree fails to switch focus to a code note branch in split mode #2804

Open
antoniotejada opened this issue Apr 21, 2022 · 0 comments

Comments

@antoniotejada
Copy link

Trilium Version

0.50.3

What operating system are you using?

Windows

What is your setup?

Local (no sync)

Operating System Version

Windows 10

Description

If you open two split notes with a code note on one side and a text note on the other, switching the focus from the text note to the code note by clicking on the code note doesn't always update the focused tree branch.

This doesn't always repro, but it reproes more easily if you click on a closing brace or on a word of the code note, both of which require the code note editor to perform some extra work highlighting.

When the error happens, the javascript console shows a timeout handler and reflow warning

[Violation] 'setTimeout' handler took 94ms
[Violation] Forced reflow while executing JavaScript took 62ms

This also breaks the widgets that depend on reporting that change, since the widget's isEnabled method is not called in that case. This was found while developing the TOC widget, see #2799 (comment) .

The following video shows how the tree fails to focus several times when switching from the text note to the code note by clicking on the editor panes. When that happens, the widget's isEnabled that has a console.debug() output also fails to appear in the javascript console.

Apps.-.Trilium.Notes.2022-04-21.19-20-48_rescaled.mp4
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

1 participant