Skip to content

Conversation

@ewrayjohnson
Copy link

What was broken: Clicking “Download” in the preview modal navigated the main window to the file URL (e.g., [/undefined/...)), breaking the app instead of triggering a download. The main toolbar download worked because it used the host’s [onDownload]; the preview bypassed it.
Why it happened: The preview download handler called [window.location.href = filePath], forcing full-page navigation and skipping the host download pipeline.
Secondary issue caught during build: Duplicate [hidden] keys in the context menu config caused a build error.
Fix: Delegate preview downloads to the host [onDownload] via [SelectionContext] and consolidate the [hidden]condition into one boolean.
Result: Preview download now behaves like the main download button—no navigation, host-controlled download; build error removed.

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.

1 participant