Repository navigation
Text dropped on a page becomes a text box (#288) - #294
Merged
Merged
Conversation
Paragraphs dragged from another app (Zotero beside Obsidian in Split View) become a text box at the drop point, on a notebook page or a board: one undo step, selected, as a paste makes. HTML alone is reduced to text. Files, pictures, PDFs, vault links and Obsidian's own drags keep their handling; a text box being typed in keeps its own drop. Found in the real-Obsidian rig with `mobile on`: Obsidian's mobile drag manager sets dropEffect "move" on every dragover, and a drag that only allows a copy was refused before any drop event. The notebook now sets "copy" for drags from outside Obsidian (view and drawer backdrop). The debug HUD gets its own drag and drop lines (types, effectAllowed, target, outcome) so a recording settles whether iPadOS hands a drop from another app to Obsidian's WebView at all; that is unproven. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Discussion #288: paragraphs dragged from another app (Zotero beside Obsidian in Split View) did nothing on a notebook. They worked in a plain
.mdnote.What changed
src/view/drop-text.ts, pure, with tests).[[links]]orobsidian://links to vault files. A text box you are typing in takes the drop itself. Practice files, PDF tabs and read-only notebooks refuse it, as they refuse a paste.mobile on: on mobile, Obsidian's drag manager setsdropEffect = "move"on every dragover. A drag that only allows a copy was then refused before anydropevent fired. The notebook'sdragover(and the drawer backdrop's, over the notebook) now setscopyfor drags from outside Obsidian.draganddroplines. Thedragline shows the types,effectAllowed, and whether it is Obsidian's own drag. Thedropline shows the target, what the drop carried, and what it became (text box,file,refusedornothing).Unproven on the iPad
I couldn't test a drop from another app on the device. Two things are unknown:
effectAllowedas the rig's drag.The HUD lines will answer both from one screen recording.
How to test
draganddroplines. Nodragline means iPadOS never handed the drag to Obsidian.Rig checks done (desktop and
mobile on):[[red.png]]dropped as text imports the picture;CI gates all pass locally: lint, review lint, CSS lint, typecheck, build and tests. One test failed, but only in this worktree: it reads
node_modules/onnxruntime-webfrom the working directory, and the worktree has nonode_modulesof its own.🤖 Generated with Claude Code