Ensure getRangePosition do not crash if the current selection is collapsed. task-2154624 Part-of: odoo/odoo#71878