Skip to content
Snippets Groups Projects
Commit d1948935 authored by Jason Van Malder's avatar Jason Van Malder
Browse files

[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#41911

Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
parent 914d4f8c
Branches
Tags
No related merge requests found
......@@ -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);
},
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment