Open orionmiz opened 2 years ago
Hello all... this is still an issue. If a custom uploader rejects before the preview is shown; the preview is not dismissed. https://github.com/editor-js/image/pull/185 seams to fix this. Any chance of getting this PR cleanup and merged?
How to reproduce the bug in a custom uploader:
In this case, Preloader is meaninglessly being hidden first by
hidePreloader
followinguploadingFailed
,then shown up by
showPreloader
followingFileReader.onload
(because it takes longer than the previous one)As a result, Preloader keeps appearing despite uploading process is already over.
How to fix the bug:
Promisify
FileReader
and do upload after awaitingFileReader.onload
I'll send a pull request including the fix commits about this issue.