Since [1] when the media dialog was re-written in owl, the problem is solved, this forward-port only keeps the added test scenarios. See the description of the initial problem below: Similarly to the comment introduced in [2], classes identifying a video are only available before media.js begins to save. This led to wronly inserting the pictogram in an incorrect location when replacing a video by a pictogram. This commit keeps track of the fact that a media node was a video before being replaced instead of trying to find out after the classes have been removed. Steps to reproduce: - Drop a "Text - Image" snippet. - Replace the image by a video. - Replace the video by a pictogram. => Was adding the pictogram in the first column's button instead. [1]: https://github.com/odoo/odoo/commit/7fd0698cf765a79959566b51e33cb76bff83d344 [2]: https://github.com/odoo/odoo/commit/d4d25c8b497e465753cef030292faa4824145cb1 task-2729177 closes odoo/odoo#95963 X-original-commit: b50a8015da7bba3b156fa8941b6c2b17533159c7 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>