How to close the import window caused by moving the mouse after selecting text

Most of the time I don’t use this feature. But I have a habit of selecting certain text to think about the contents. I don’t need to re-copy it to another entry, but such an action triggers the import window. This is annoying to me. I need to go and close the window, but it may pop up again in a few seconds.

1 Like

You can disable the drag-and-drop defaults. See here:

https://tiddlywiki.com/#Hidden%20Setting%3A%20Disable%20Drag%20and%20Drop

To disable all the drag and drop operations that are built into the core, set the following tiddler to “no”:

$:/config/DragAndDrop/Enable

Just make a new tiddler with the above name, and type “no” into the body, and save.

Of course, leave breadcrumbs for yourself so that you can find this and remove it if/when you do want drag-and-drop functions. Come back here, or look at documentation, if you want some more complex solution.

Following up:

The above solution prevents drag-and-drop even for things like reordering items within a tag-pill, so it’s pretty drastic… You may want to disable only the background drag-and-drop of the whole page background area (the dropzone for importing).

To do that, you can overwrite the shadow’s page template ($:/core/ui/PageTemplate) by commenting out the drop zone. The drop zone is near the bottom. Replace the lines in question with something like:

<!--- <$dropzone enable=<<tv-enable-drag-and-drop>> class="tc-dropzone tc-page-container-inner"> DISABLE DRAG-DROP IMPORTS -->

<$list filter="[all[shadows+tiddlers]tag[$:/tags/PageTemplate]!has[draft.of]]" variable="listItem">

<$transclude tiddler=<<listItem>>/>

</$list>

<!-- </$dropzone> -->

(I recommend also having something like a “notes” field where you track any changes you make to shadow tiddlers, so that your future self can review what you did, and why, in the case of a system upgrade.)

Then make a sidebar tab, or something, to hold a drag-drop import box, so that you can easily import things (plugins, tagpills, helpful tiddlers from other wikis):

<$dropzone>
<div style="width:100%;height:20em;border: 1px solid red;line-height:20em;text-align:center;font-size:200%;">
Drag and drop to import
</div>
</$dropzone>

tag the above tiddler with $:/tags/SideBar and give it a caption field (dropzone, or import, or whatever you like) to find it easily among the sidebar tabs.

Thank you so much, your solution solved my needs perfectly. I really appreciate it.

Perhaps it would be useful to have a hidden setting here. The dropzone widget already has an “enabled” attribute, so we could just transclude that value from a shadowed configuration tiddler.

3 Likes

Yes, the kind of people who want to turn the page-size dropzone off are likely to include quite a few who would not want to overwrite the core. Also this would be more friendly to upgrades!

Yes, I think it would be a bit easier to have a setting that doesn’t easily conflict with version updates.