trilium
trilium copied to clipboard
(Bug report) “Edit this note” button disappears
Trilium Version
0.50.3
What operating system are you using?
macOS
What is your setup?
Local + server sync
Operating System Version
macOS 12.3.1
Description
Hi,
Sometimes I notice that the "Edit this note" button at the top right corner disappears.
I cannot find a stable way to reproduce this, but this happens especially when I search something in the "quick search", and open the note in a new tab.
Background: In case that I delete something important by accident, I set all notes as "read-only".
Hi, is this a temporary glitch, as in when you switch away and then switch back to the same note, does the icon appear again correctly?
Hi, is this a temporary glitch, as in when you switch away and then switch back to the same note, does the icon appear again correctly?
Yes! The icon appears again correctly if I do that, and this is the only way I know to "fix" that.
At the very least, there's one issue with the icon failing to update (hide or show) when the "Editable:" dropdown changes:
- If the note is readonly and you switch to always editable, the icon stays there.
- If the note is always editable and you switch to readonly, the icon doesn't show.
If you reload the note, then the icon is displayed properly according to the editable property.
This could happen if the button widget is hooking on entitiesReloadedEvent
but failing to filter in loadResults.hasAttributeRelatedChanges
, which is true
for those dropdown changes.
Another counter-intuitive issue is that if you:
- set an always editable note to readonly, the CKEditor disappears, as expected, but the edit icon fails to appear (this issue)
- reload so the edit icon appears,
- click on the edit icon, the CKEditor appears, as expected
- set the note to always writeable, the CKEditor stays, as expected
- set the note to readonly, the CKEditor stays, which is wrong
I assume the reason the CKEditor stays in this case is because the "temporarily editable" state failed to reset when you switched from readonly to editable.