[FIX] web_editor: remove overlay of link

Before this commit, in the website builder or in mass_mailing, when
creating a link then hitting enter, then click somewhere in the page,
the outline was not removed from all the links.

In mass mailing, the overlay was never removed. Not even upon save.

Task-2682176

closes odoo/odoo#79634

X-original-commit: 71325540712342ef8f251a37ee29270bd3b87469
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
Nicolas Bayet
2021-11-16 10:02:33 +00:00
parent 12953e98b9
commit a101887f66
@@ -61,7 +61,7 @@ const LinkTools = Link.extend({
if (!this.el) {
return this._super(...arguments);
}
this.$link.removeClass('oe_edited_link');
$(this.options.wysiwyg.odooEditor.document).find('.oe_edited_link').removeClass('oe_edited_link');
const $contents = this.$link.contents();
if (!this.$link.attr('href') && !this.colorCombinationClass) {
$contents.unwrap();