[FIX] website: fix mega menu close while translating it
Issue
- Install website
- Add another language
- Edit > Click on a menu item > Edit menu
- Add mega menu & save
- Change language
- Click on the translate button
- Try to translate a mega menu's item
You can't, it always closes.
Cause
This is the default bootstrap behavior.
Solution
Override the default bootstrap behavior.
OPW-2151710
closes odoo/odoo#42012
X-original-commit: d19489350f23ed245db5a2efa9e08ba878ba77f5
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
This commit is contained in:
@@ -73,6 +73,13 @@ var TranslatePageMenu = websiteNavbarData.WebsiteNavbarActionWidget.extend({
|
||||
}
|
||||
|
||||
var translator = new TranslatorMenu(this);
|
||||
|
||||
// We don't want the BS dropdown to close
|
||||
// when clicking in a element to translate
|
||||
$('.dropdown-menu').on('click', '.o_editable', function (ev) {
|
||||
ev.stopPropagation();
|
||||
});
|
||||
|
||||
return translator.prependTo(document.body);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user