diff options
| author | Vincent Schippefilt <vsc@odoo.com> | 2018-04-24 11:39:14 +0200 |
|---|---|---|
| committer | Vincent Schippefilt <vsc@odoo.com> | 2018-04-25 09:11:45 +0200 |
| commit | 549573e24c1f0b0a4a31636732db007bfe1a11d7 (patch) | |
| tree | c6cbdfd8ed0eb07188207e30605bef584ebfa92b /addons | |
| parent | de72b13064df5683dcde45b2b1704787dfb08108 (diff) | |
[FIX] web: allow standard shortcuts on firefox
when navigating with the keyboard, using the ALT key is the trigger
for most of the access keys. In Firefox on Linux, this prevents a number
of existing shortcuts (like ALT+Left arrow for browser back).
This fix allows browsers to execute those shortcuts.
Note: in Firefox on linux ALT+F E V S B T H are assigned to menus and
cannot be stopped, removing the keypress handler does not change
anything.
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/web/static/src/js/chrome/keyboard_navigation_mixin.js | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/addons/web/static/src/js/chrome/keyboard_navigation_mixin.js b/addons/web/static/src/js/chrome/keyboard_navigation_mixin.js index dc1b5247cb1..778f2d68498 100644 --- a/addons/web/static/src/js/chrome/keyboard_navigation_mixin.js +++ b/addons/web/static/src/js/chrome/keyboard_navigation_mixin.js @@ -26,7 +26,6 @@ odoo.define('web.KeyboardNavigationMixin', function (require) { var KeyboardNavigationMixin = { events: { 'keydown': '_onKeyDown', - 'keypress': '_onKeyPress', 'keyup': '_onKeyUp', }, @@ -178,21 +177,6 @@ odoo.define('web.KeyboardNavigationMixin', function (require) { } }, /** - * hides the shortcut overlays when key press event is triggered on the ALT key - * - * @private - * @param keyPressEvent {jQueryKeyboardEvent} the keyboard event triggered - * @return {undefined|false} - */ - _onKeyPress: function (keyPressEvent) { - if ((keyPressEvent.altKey || keyPressEvent.key === 'Alt') && !keyPressEvent.ctrlKey) { - if (keyPressEvent.preventDefault) keyPressEvent.preventDefault(); else keyPressEvent.returnValue = false; - if (keyPressEvent.stopPropagation) keyPressEvent.stopPropagation(); - if (keyPressEvent.cancelBubble) keyPressEvent.cancelBubble = true; - return false; - } - }, - /** * hides the shortcut overlays when keyup event is triggered on the ALT key * * @private |
