[FIX] website: fix menu item edition from "edit link" button
When changing the label of a navbar menu via the link popover "edit link" button and the menu edition dialog, the label would not be changed after saving. Reloading the page would display the updated label. While the RPC was correctly made to update the website.menu, the editor would apply a historyRevert after the DOM update to change the menu label on the page. This change should not be recorded by the editor as a RPC to update the website.menu is executed at the same time. task-2513588 X-original-commit: 71ac6244037608cf529586b43946f992b723e7db Part-of: odoo/odoo#81351
This commit is contained in:
@@ -75,8 +75,10 @@ const NavbarLinkPopoverWidget = weWidgets.LinkPopoverWidget.extend({
|
||||
method: 'save',
|
||||
args: [websiteId, {'data': [data]}],
|
||||
}).then(function () {
|
||||
self.options.wysiwyg.odooEditor.observerUnactive();
|
||||
self.$target.attr('href', link.url);
|
||||
$menu.text(link.content);
|
||||
self.options.wysiwyg.odooEditor.observerActive();
|
||||
});
|
||||
});
|
||||
dialog.open();
|
||||
|
||||
Reference in New Issue
Block a user