[FIX] web_editor: disable command hints on navigation items
Before this commit a "List" command hint was set as placeholder in navigation items without content upon selection of the header menu. This showed up when using the sidebar template of the header menu. After this commit the command hints are blacklisted for nav-items in website. task-2677310 closes odoo/odoo#82693 X-original-commit: e0cc23b44d798a5bf79d3e8f7e183f5e8a3c6901 Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
@@ -116,8 +116,12 @@ const Wysiwyg = Widget.extend({
|
||||
}
|
||||
},
|
||||
isHintBlacklisted: node => {
|
||||
return node.hasAttribute &&
|
||||
(node.hasAttribute('data-target') || node.hasAttribute('data-oe-model'));
|
||||
return (node.classList && node.classList.contains('nav-item')) || (
|
||||
node.hasAttribute && (
|
||||
node.hasAttribute('data-target') ||
|
||||
node.hasAttribute('data-oe-model')
|
||||
)
|
||||
);
|
||||
},
|
||||
filterMutationRecords: (records) => {
|
||||
return records.filter((record) => {
|
||||
|
||||
Reference in New Issue
Block a user