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
[BUG] Drag and Drop does not work on note re open #489
Comments
Issue replicates for me as well |
happens to me as well |
Happens to me as well. I am getting this error in console whenever I try to drag and drop the list items. Uncaught TypeError: Cannot read properties of null (reading 'left')
at DragAndDropState.calculateLeftPadding (plugin:obsidian-outliner:1364:56)
at new DragAndDropState (plugin:obsidian-outliner:1280:14)
at DragAndDrop.startDragging (plugin:obsidian-outliner:1174:23)
at DragAndDrop.handleMouseMove (plugin:obsidian-outliner:1091:22) |
Same here |
It also seems related to the actual note. I have a simple outline I can revisit and it keeps working. I have a more complex one with images in the tree that doesn't work. |
I am also getting this unexpected feature. As described above, the impact seems to apply to specific notes, not program wide. I also note that other functions of outliner are affected in a similar manner, such as my ability to tab not working but I can move the line with the mouse, or in other notes, the mouse doesn't work but I can use tab, but sometimes shift-tab still works. |
Also having this issue |
I also have the issue that drag and drop does not work. From my experiments it does not work in notes with YAML frontmatter (as is default for Obsidian). In simple notes without frontmatter drag and drop works as expected. |
I have the issues on notes without any metadata added. Copy and pasting data from a note with the issue to a new note seems to infect the new note but if I type the same data out, there isn't an issue. When I open the note in VS Code, I don't see anything different though so I am not sure if that is just circumstantial or if there is something to it. |
I have the same issue. A bullshit workaround: to change in settings "Properties in document" from Visible to Source |
Same issue here. Replicated console error noted by TheFermi0n during an interaction with new Obsidian properties feature. Workaround from drozd2000 is effective: changing Editor setting for "Properties in Document" from "Visible" to "Source". Attached short video of replication below. Note that it persists identically when other plugins are disabled. Checked after making this recording and didn't want to re-take the clip when all else was the same. bug.mp4 |
Hi guys, I don't know the language and this plugin well enough. So I made this workaround for me: calculateLeftPadding() {
this.leftPadding = view.coordsAtPos(0, -1).left;
} to this: calculateLeftPadding() {
const { view } = this;
for (let i = 1; i <= view.state.doc.lines; i++) {
const line = view.state.doc.line(i);
const a = view.coordsAtPos(line.from, -1);
if (a !== null) {
this.leftPadding = a.left;
return;
}
}
this.leftPadding = 0;
} Yeah. It looks bad and strange but it works and it is enough for me :-) |
I tried your patch @drozd2000 but unfortunately drag and drop still fails on me. @vslinko are you still interested in maintaining this project? If not maybe I'll maintain a fork. |
@evelant Hi. Unfortunately, right now I can't find enough time and energy to focused maintenance of this project. But I will be glad to merge someone's PR. |
there are more bugs with drag and drop. not only this one
You can share your error |
Describe the bug
I have tested this plugin in a brand new vault with no other community plugin installed using standard theme.
I can create a new bullet list in a new note and within that use drag and drop to move bullets around.
Once the note is closed and reopened drag and drop does not work anymore on same note.
Does not work on old note with bullet lists eigher
To Reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: