Fixed WebUI crash when a status opened in the media modal is deleted (#15701)
* Fixed picture in picture compatibility error in WebUI when status is deleted
* Revert "Fixed picture in picture compatibility error in WebUI when status is deleted"
This reverts commit f003b7d9d8.
* Close the modal display of the image when status is deleted
* Fixed the case statement before the default statement
* Removed unnecessary parts