Skip to content

Failed images cannot be deleted #282

@danroot

Description

@danroot

When an image load fails for any reason, a "spinner" is shown indefinitely and the UI toggle is never shown. This means the user cannot delete the problem image.

To Reproduce:

  • Upload an image and save
  • Delete the image from the backend. This results in a 404, but similar could happen if an invalid image is uploaded, the uploader endpoints do something wrong, etc.
  • Reload the page
  • Observe the image shows 'loading' indicator indefinitely and the editorjs menu is never shown, meaning the image cannot be deleted via the UI.

Expected behavior is that the image shows a failed indicator and the editorjs menu for the block is still shown, allowing the user to delete and try again.

I believe the root cause is just that only "loaded" is being handled, not "error". Adding event handling should help, or making it such that the editorjs menu is not contingent on the block to finish loading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions