Browse Source

[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/1066/head
Jairo Llopis 6 years ago
parent
commit
43e5a7bb42
No known key found for this signature in database GPG Key ID: 59564BF1E22F314F
  1. 5
      web_responsive/static/src/js/web_responsive.js

5
web_responsive/static/src/js/web_responsive.js

@ -243,8 +243,11 @@ odoo.define('web_responsive', function(require) {
// Trigger navigation to pseudo-focused link // Trigger navigation to pseudo-focused link
// & fake a click (in case of anchor link). // & fake a click (in case of anchor link).
if (e.key === 'Enter') { 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(); this.handleClickZones();
}
return; return;
} }

Loading…
Cancel
Save