You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you select some piece of text with the mouse other than from a text input, and then drag that selected text onto a list created via the list-links-draggable macro, the HTML code for the selected text get added as a (missing) tiddler to the list. For example, if you highlight (select with the mouse) a tiddler name in the "Open" Tab of the side bar and then attempt to move that tiddler to a different location in the story river by dragging the link for the tiddler to a different location in the list, it drops the HTML code for the link instead.
Expected behavior
I would expect the HTML to be stripped (except any HTML that is part of the rendered text that was selected); for example, if you select the text concise description and drag it into the list, then concise description (and not <span attr1=val1 attr2=val2 ...>concise description</span>) to be dropped into the list. (But if the text is displayed as <span>some text</span>, then if you select it and drag it into a list-links-draggable's list, then it should be displayed in the list as <span>some text</span>.)
To Reproduce
You can reproduce with any list created by a links-list-draggable macro, but here's one example of how to reproduce:
On the sidebar on the right, in the story list (displayed in the "Open" tab), use the mouse to select the "GettingStarted" tiddler (or only part of it), as in the screenshot below:
Drag the selected "GettingStarted" tiddler title onto the "HelloThere" tiddler title immediately above it (and release the mouse button).
Note the HTML code that gets displayed (and the missing tiddler that appears in the story river as a result of being added to the story list)
Screenshots
No response
TiddlyWiki Configuration
Version [e.g. v5.3.3]
Saving mechanism: TiddlyDesktop, or just opened in the browser
Plugins installed: none (tested with new Empty wiki)
Desktop (please complete the following information):
Hi @bluepenguindeveloper I’m pretty sure that this issue reflects the peculiarities in the way that browsers handle drag and drop, and isn’t a bug in TiddlyWiki per se.
Browsers support a number of different payload types for drag and drop events. TiddlyWiki uses a custom link format as the payload format when dragging and dropping tiddlers. This all works fine when dragging the link itself.
However, if text is selected then the browser behaves completely differently. Instead of the payload being a link, it sends a fragment of HTML representing the selected text. TiddlyWiki doesn’t recognise that as a link because it isn’t a link, and so it just tries to import it as a fragment of HTML text in a new untitled tiddler.
The fact that browsers implement two semantically different types of drag and drop with almost the same user interface seems like the heart of the problem.
Describe the bug
If you select some piece of text with the mouse other than from a text input, and then drag that selected text onto a list created via the list-links-draggable macro, the HTML code for the selected text get added as a (missing) tiddler to the list. For example, if you highlight (select with the mouse) a tiddler name in the "Open" Tab of the side bar and then attempt to move that tiddler to a different location in the story river by dragging the link for the tiddler to a different location in the list, it drops the HTML code for the link instead.
Expected behavior
I would expect the HTML to be stripped (except any HTML that is part of the rendered text that was selected); for example, if you select the text
concise description
and drag it into the list, thenconcise description
(and not<span attr1=val1 attr2=val2 ...>concise description</span>
) to be dropped into the list. (But if the text is displayed as<span>some text</span>
, then if you select it and drag it into a list-links-draggable's list, then it should be displayed in the list as<span>some text</span>
.)To Reproduce
You can reproduce with any list created by a links-list-draggable macro, but here's one example of how to reproduce:
Screenshots
No response
TiddlyWiki Configuration
Desktop (please complete the following information):
Additional context
No response
The text was updated successfully, but these errors were encountered: