Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media deleted from the Media view remains in the editor #23166

Open
twstokes opened this issue May 6, 2024 · 3 comments
Open

Media deleted from the Media view remains in the editor #23166

twstokes opened this issue May 6, 2024 · 3 comments

Comments

@twstokes
Copy link
Contributor

twstokes commented May 6, 2024

Expected behavior

  • The Media view, editor, and progress indicator should all be in sync.

Actual behavior

  • Media deleted from the Media view remains in the editor.
  • If the media is deleted during upload, the upload progress indicator is perpetually shown in the Posts view.
cancelling_media.mp4

Steps to reproduce the behavior

  1. Create a new post
  2. Upload a new image using the Image block
  3. Delete the new image from the Media view
  4. Go back to the post containing the (now deleted) media
Tested on iPhone 15 Pro, iOS 17, Jetpack iOS / WordPress iOS 24.8
@dangermattic
Copy link
Collaborator

Thanks for reporting! 👍

@geriux
Copy link
Contributor

geriux commented May 7, 2024

This one is tricky, I guess we could find the block in the post's content using the mediaId/URL and remove it from the native side but I'm not sure how easily we can match the block's HTML content. Maybe using something similar to the media uploads and the regex we use to replace the block's content.

A quick change could be to not allow removing media if it's being uploaded from a post?

@twstokes
Copy link
Contributor Author

twstokes commented May 7, 2024

Android sibling: wordpress-mobile/WordPress-Android#20777

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants