From b889e4b3e6d531ccb0e8f4107b50f1131e65e528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Thu, 30 Mar 2017 22:03:29 +0200 Subject: [IMP] web: form support for tab navigation The new form view does not really work well with the TAB key. This is partly caused by the fact that the tab event is preventdefaulted. With this commit, we reintroduce a basic navigation with TAB and shift+TAB. --- addons/web/static/src/js/fields/abstract_field.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/fields') diff --git a/addons/web/static/src/js/fields/abstract_field.js b/addons/web/static/src/js/fields/abstract_field.js index e4f5ef9d9f8..01de5fb334c 100644 --- a/addons/web/static/src/js/fields/abstract_field.js +++ b/addons/web/static/src/js/fields/abstract_field.js @@ -348,7 +348,7 @@ var AbstractField = Widget.extend({ */ _onKeydown: function (event) { if (event.which === $.ui.keyCode.TAB) { - this.trigger_up('move_next'); + this.trigger_up(event.shiftKey ? 'move_previous' : 'move_next'); event.preventDefault(); } }, -- cgit v1.2.3