[FIX] web_responsive: Disable access to hidden menus

When doing menu search, some menus that the user didn't have permission to use were presented to him.

Fix #850.
pull/1390/head
Jairo Llopis 2018-08-02 10:44:25 +01:00 committed by Alexandre Díaz
parent b684813325
commit c1eeb017fe
1 changed files with 5 additions and 2 deletions

View File

@ -243,8 +243,11 @@ odoo.define('web_responsive', function(require) {
// Trigger navigation to pseudo-focused link
// & fake a click (in case of anchor link).
if (e.key === 'Enter') {
window.location.href = $('.web-responsive-focus').attr('href');
var href = $('.web-responsive-focus').attr('href');
if (!_.isUndefined(href)) {
window.location.href = href;
this.handleClickZones();
}
return;
}