From 2fe7f6b008f75df9801d4dbdad341ba01f7dc34b Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Tue, 24 Aug 2021 10:19:46 +0000 Subject: [PATCH] [FIX] web_editor: review misleading comment The editor was updated to handle a TODO but the TODO comment was not removed. Originally, I wanted this commit to handle all TODO comments around that code but failed to find the time -> at least this fixes the comments... Part of https://github.com/odoo/odoo/pull/74941 Part-of: odoo/odoo#74941 --- .../static/src/js/wysiwyg/widgets/link_popover_widget.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/web_editor/static/src/js/wysiwyg/widgets/link_popover_widget.js b/addons/web_editor/static/src/js/wysiwyg/widgets/link_popover_widget.js index 35f6fba88f0..7a076adb3e5 100644 --- a/addons/web_editor/static/src/js/wysiwyg/widgets/link_popover_widget.js +++ b/addons/web_editor/static/src/js/wysiwyg/widgets/link_popover_widget.js @@ -174,12 +174,11 @@ const LinkPopoverWidget = Widget.extend({ /** * Removes the link/anchor. * - * TODO Call business methods once new editor is released instead of click - * * @private * @param {Event} ev */ _onRemoveLinkClick(ev) { + // TODO surely there is better to do than finding the editor instance in the DOM? $('#wrapwrap').data('wysiwyg').odooEditor.execCommand('unlink'); ev.stopImmediatePropagation(); },