Media deleted from the Media view remains in the editor
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.
https://github.com/wordpress-mobile/WordPress-iOS/assets/2092798/1b5e182a-88eb-4d05-9b42-37cf743658cb
Steps to reproduce the behavior
- Create a new post
- Upload a new image using the Image block
- Delete the new image from the Media view
- Go back to the post containing the (now deleted) media
Tested on iPhone 15 Pro, iOS 17, Jetpack iOS / WordPress iOS 24.8
Thanks for reporting! 👍
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?
Android sibling: https://github.com/wordpress-mobile/WordPress-Android/issues/20777