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

Test if selectedNode.offsetLeft is 0 when dragging a dom node #7714

Closed
wants to merge 1 commit into from

Conversation

BurningTreeC
Copy link
Contributor

this adds a necessary test in the edge-case that the offsetLeft property of the selectedNode is 0. It can be zero. For domNode.offsetWidth this test should be superfluous

this adds a necessary test in the edge-case that the offsetLeft property of the selectedNode is 0. It can be zero.
For domNode.offsetWidth this test should be superfluous
@vercel
Copy link

vercel bot commented Sep 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
tiddlywiki5 ✅ Ready (Inspect) Visit Preview Sep 2, 2023 10:09am

@pmario
Copy link
Contributor

pmario commented Sep 2, 2023

Is there a related issue?

@BurningTreeC
Copy link
Contributor Author

Hi @pmario ,

there's no GitHub issue that's related but I've encountered an issue with this on https://burningtreec.github.io/tiddlywiki-multi-columns

The problem can be reproduced if one configures the layout in the ControlPanel (Appearance > MultiColumn) so that the story-rivers have no padding (0)

In that case, when you drag a tiddler, at dragstart the variables don't get collected (like the selectedNode's height) and you can see that the dragover-animations don't work

@BurningTreeC
Copy link
Contributor Author

That is because selectedNode.offsetLeft reports 0 in that case and 0 gets interpreted as false

Jermolene added a commit that referenced this pull request Nov 21, 2023
@Jermolene
Copy link
Owner

Thanks @BurningTreeC I've pushed an alternate fix in de6b866

@Jermolene Jermolene closed this Nov 21, 2023
munnox pushed a commit to munnox/TiddlyWiki5 that referenced this pull request Dec 24, 2023
@BurningTreeC BurningTreeC deleted the patch-57 branch March 29, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants