From f6697f5a1c9b795686a275174ab880e789d20797 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Thu, 2 Aug 2018 10:44:25 +0100 Subject: [PATCH] [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. --- web_responsive/static/src/js/web_responsive.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web_responsive/static/src/js/web_responsive.js b/web_responsive/static/src/js/web_responsive.js index 0cc2fa1e..0736aaf9 100644 --- a/web_responsive/static/src/js/web_responsive.js +++ b/web_responsive/static/src/js/web_responsive.js @@ -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'); - this.handleClickZones(); + var href = $('.web-responsive-focus').attr('href'); + if (!_.isUndefined(href)) { + window.location.href = href; + this.handleClickZones(); + } return; }