Skip to content
Snippets Groups Projects
Commit 76a5a76d authored by David Monjoie's avatar David Monjoie
Browse files

[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#121711

X-original-commit: 4bcba1d7
Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
Co-authored-by: default avatardhba-odoo <dhba@odoo.com>
Co-authored-by: default avatarDavid Monjoie <dmo@odoo.com>
parent b526bc1e
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment