Skip to content

[Bug] Drag and drop onto a tool opens a preview instead of loading it into that tool #55

Description

@AndrewVoisovych

Dropping a file while a tool (Split, Compress, Protect, etc.) is open opens a full-screen PDF preview instead of loading the file into that tool. A single window-level drop handler catches every drop on the page and routes it to the preview, no matter which tool is open.

Steps to reproduce

  1. Open the web app and go to a tool, for example Split (/#/split).
  2. Drag a PDF from the file manager and drop it on the tool.
  3. Expected: the PDF loads into the tool.
  4. Actual: a full-screen preview opens and the tool stays empty.

On Merge (/#/merge) a drop both adds the file and opens the preview at the same time (a double trigger).

Root cause

handleGlobalDrop in App.tsx (wired to a window drop listener in Layout.tsx) sets droppedFile, which renders <PdfPreview>. Tool pages have no local dropzone, so every drop bubbles up to it. MergeTool's dropzone calls preventDefault() but not stopPropagation(), so the drop reaches the global handler as well.

Screenshots

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions