Skip to content

file browser crashes on Firefox/Safari, the "fallback" is just a toast saying use Chrome #365

@avinxshKD

Description

@avinxshKD

the directory browser (showDirectoryPicker), file save (createWritable), and save-as (showSaveFilePicker) all use the File System Access API which only exists in Chrome and Edge. on Firefox/Safari these throw a TypeError and the user gets nothing.

the "fallback" is literally toast.info('Switch to Edge/Chrome!'), that's it.

What breaks on Firefox:

  1. clicking "Open Directory" in file browser => crash
  2. clicking "Save" in file editor => crash
  3. clicking "Save As" in file editor => the file-saver fallback exists but hardcodes MIME to application/json for all file types
  4. saving a .graphml from toolbar => crash

Bonus problems while we're at it:

file extension blocklist is case-sensitive: .PNG and .JPEG pass through
no file size limit. drop a huge file and the tab freezes
File objects get JSON.stringify'd to localStorage as {} (line 42 of fileBrowser) ,they don't serialize

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions