Skip to content

Image import fails if focus returns to excalidraw before choosing #10272

@mbpowers

Description

@mbpowers

Importing images will fail if focus goes back to excalidraw before the image is picked.

Sometimes the picker will open quickly enough to take focus, then it will only fail if you move the mouse back into the excalidraw window (at which point the below error is thrown).

Other times the file picker does not open quickly enough, and as the mouse was on excalidraw to click the insert image button it will error immediately.

I am using firefox with Gnome file picker on Hyprland if that matters.

Here is the console error:

Opening the file was canceled (legacy-fs). instrument.js:109:46
DOMException: Request Aborted
    Of errors.ts:16
    legacySetup filesystem.ts:71
    i file-open-7c801643.js:1
    n utils.ts:121
    r helpers.js:72
    setTimeout handler*e.prototype._wrapTimeFunction/kve trycatch.js:86
    i utils.ts:119
    c filesystem.ts:47
    r helpers.js:72
    _wrapEventTarget trycatch.js:137
    F2e instrument.js:468
    legacySetup filesystem.ts:57
    r helpers.js:72
    kve trycatch.js:95
    legacySetup filesystem.ts:56
    s file-open-7c801643.js:1
    s file-open-7c801643.js:1
    fae index.mjs:1
    Z4 filesystem.ts:36
    f5 App.tsx:9319
    f5 App.tsx:4547
    onChange Actions.tsx:317
    onChange ToolButton.tsx:179
    React 11
    r helpers.js:72

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