Passing customUUID causes broken UI
What happened?
My main use-case was to insert blocks with a UUID that matches my other DB, but when I use customUUID the block seems to be weird & non-selectable in some ways:
- pressing
arrow downwhile on the block above does not move the cursor into the block - (clicking into the block works fine)
- right click on the bullet does nothing (no context menu)
- pressing
Escdoesn't select the block, like it would other blocks
Reproduce the Bug
console.log('result:',
await logseq.Editor.insertBlock(
(await logseq.Editor.getCurrentBlock()).uuid,
`Test 123`,
{ sibling: false, customUUID: '9ce207bf-e22d-4607-8140-3464a9256c8d' })
)
(the result has the correct UUID, but a Editor.getBlock with that UUID fails)
(Also, after page refresh it seems to work)
Expected Behavior
A new block created that works like other ones.
Desktop Platform Information
Fedora 37, LogSeq 0.8.10 (AppImage)
Mobile Platform Information
No response
Additional Context
I'm saving block state and trying to re-create deleted ones it with the same UUID as before.
Thought the workaround from https://github.com/logseq/logseq/issues/4141 might help - but sadly also happens when inserting with {properties: { id: uuid } }:
await logseq.Editor.insertBlock(
currentBlock.uuid,
content,
{ sibling: false/* , customUUID: uuid */, properties: { id: uuid } },
)
we found the fix :tada: https://github.com/logseq/logseq/pull/7375