Skip to content

fix file drops when standalone page uses file:// - #1

Merged
M-Colley merged 1 commit into
M-Colley:mainfrom
wgnrto:fix-browser-file-drop
Sep 13, 2026
Merged

M-Colley merged 1 commit into
M-Colley:mainfrom
wgnrto:fix-browser-file-drop

Conversation

@wgnrto

@wgnrto wgnrto commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix setDropState() and EventListener in wireUp().

Problem

Drag-and-drop of the source file into the dedicated area in browser/mechcheck.html. Did not work and throws the following errors:

Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
    at wireUp (mechcheck.html:3695:17)
    at mechcheck.html:3718:1
mechcheck.html:3693 Uncaught (in promise) EncodingError: A URI supplied to the API was malformed, or the resulting Data URL has exceeded the URL length limitations for Data URLs.
mechcheck.html:1 Unsafe attempt to load URL file:///mechcheck-main/mechcheck-main/browser/mechcheck.html from frame with URL file:///mechcheck-main/mechcheck-main/browser/mechcheck.html. 'file:' URLs are treated as unique security origins.

Testing

  • Opened browser/mechcheck.html by double-clicking it.
  • Dropped an Overleaf source ZIP.
  • Confirmed that the project was read successfully.

@M-Colley
M-Colley merged commit 339a0fd into M-Colley:main Sep 13, 2026
3 of 4 checks passed
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.

2 participants