Skip to content

Commit de4cf75

Browse files
yajochaule97
authored andcommitted
[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 OCA#850.
1 parent b868008 commit de4cf75

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

web_responsive/static/src/js/web_responsive.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,11 @@ odoo.define('web_responsive', function(require) {
243243
// Trigger navigation to pseudo-focused link
244244
// & fake a click (in case of anchor link).
245245
if (e.key === 'Enter') {
246-
window.location.href = $('.web-responsive-focus').attr('href');
247-
this.handleClickZones();
246+
var href = $('.web-responsive-focus').attr('href');
247+
if (!_.isUndefined(href)) {
248+
window.location.href = href;
249+
this.handleClickZones();
250+
}
248251
return;
249252
}
250253

0 commit comments

Comments
 (0)