[FIX] web_editor: fix select all in empty paragraph
The previous code with `parentsUntil` would not return any result in an empty paragraph because the only valid element would be the anchorNode itself but `parentsUntil` would only return parents and never the base node itself. It makes sense, but is not suitable for the case at hand. Before this commit: CTRL+A does nothing from inside an empty paragraph. After this commit: CTRL+A correctly triggers a select all from inside an empty paragraph. Task-3150956 closes odoo/odoo#116150 Signed-off-by:David Monjoie (dmo) <dmo@odoo.com> Co-authored-by:
dhba-odoo <dhba@odoo.com> Co-authored-by:
David Monjoie <dmo@odoo.com>
Loading