Issue detected with tests in the branch that replace deferred by native Promise. Need to add isMedia to detect if the target is already a media when focus the editor. This is a manual forwardport of PR odoo/odoo#31632. closes odoo/odoo#31633 Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>