[FIX] web_editor: not override root on website
Before this commit, if the editor was initiated as a simple editor rather than the website editor (eg. the editor in the forum or profile) the $root of the wysiwyg was wrongly assigned to #wrapwrap rather than the $editable. Subsequent binding (eg. LinkPopover) was bound to too many elements which generated incorrect behaviors (eg, link popover on triggered on every links). Task-2691117 closes odoo/odoo#79810 X-original-commit: 58c1b04de1ec9179b940ee930984a232bb5de30d Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
@@ -128,7 +128,7 @@ const Wysiwyg = Widget.extend({
|
||||
const $wrapwrap = $('#wrapwrap');
|
||||
if ($wrapwrap.length) {
|
||||
$wrapwrap[0].addEventListener('scroll', this.odooEditor.multiselectionRefresh, { passive: true });
|
||||
this.$root = $wrapwrap;
|
||||
this.$root = this.$root || $wrapwrap;
|
||||
}
|
||||
|
||||
if (this._peerToPeerLoading) {
|
||||
|
||||
Reference in New Issue
Block a user