Closed dwelle closed 2 years ago
Diff: https://github.com/dwelle/browser-fs-access/compare/v0.20.5...main
Works swimmingly on Excalidraw (at least on my machines™): https://github.com/excalidraw/excalidraw/pull/4032
Lemme know and I'll open a PR.
Fixed via #74.
Hard to reproduce this one and is may be tied to specific hardware and time (i.e. SSD access speed). I've reproduced on MacOS Safari 14, and iPadOS Safari 14.
Repro case, especially after reload:
https://codesandbox.io/s/reverent-yalow-tk2rp?file=/src/App.js
I can also reproduce on Excalidraw (loading a scene from file).
One way to handle this is to add an interval checking the
input.files
and resolving if it contains any file:https://codesandbox.io/s/determined-scott-wfp6o?file=/src/App.js
Strange thing is once this interval is set up it pretty much never reproduces (though it's really hard to disprove a false negative).
Using the setInterval hack would require having an abort handler again. Provided we don't want to do all that here, I propose passing the
input
into thesetupLegacyCleanupAndRejection()
(and rename the method to something likelegacySetup
) so that we can do these hacks ourselves in the host apps.