WordPress-iOS icon indicating copy to clipboard operation
WordPress-iOS copied to clipboard

Media deleted from the Media view remains in the editor

Open twstokes opened this issue 1 year ago • 3 comments

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

  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

twstokes avatar May 06 '24 20:05 twstokes

Thanks for reporting! 👍

dangermattic avatar May 06 '24 20:05 dangermattic

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?

geriux avatar May 07 '24 09:05 geriux

Android sibling: https://github.com/wordpress-mobile/WordPress-Android/issues/20777

twstokes avatar May 07 '24 19:05 twstokes