Before this commit, it was possible to set the selection of the document whenever sanitizing an element that was not present in the dom. task-2877501 closes odoo/odoo#94900 X-original-commit: 7b60241e01914ffc0176c24d4e780f773f9a277f Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>