Reproduction: 1. Go to any record with a chatter 2. Open full composer 3. Enter a special case for the text using shortcuts (CTRL+I for italic, CTRL+B for bold, etc) 4. exit the special case with the same shortcut 5. JS error Reason: A selection is not null check is missing in the condition Related PR: https://github.com/odoo/odoo/pull/136777 closes odoo/odoo#137499 X-original-commit: db0325503576d06521ab65a64d3c9cce837e66bc Signed-off-by: David Monjoie (dmo) <dmo@odoo.com> Signed-off-by: Jinjiu Liu (jili) <jili@odoo.com>