From c2b4790be426f039ec47b0888b5e58c7970c3dae Mon Sep 17 00:00:00 2001 From: Vincent Schippefilt Date: Tue, 25 Sep 2018 20:48:22 +0200 Subject: [FIX] web: fix date picker fields do not capture the focus event when invisible Before this fix, in form view, when a datepicker was not visible (because they were on another page or literally invisible), when the user pressed TAB and the datepicker was positionned after the current field in the form, it was capturing the focus during the activate phase of the navigation_move. This is not correct for invisible elements. After this fix, only focusable datepickers get the focus during the activation phase of the navigation_move. co-author: aab-odoo (aab@odoo.com) --- addons/web/static/src/js/fields/basic_fields.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/fields/basic_fields.js') diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index 41885837353..0c28f0f4b61 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -538,7 +538,7 @@ var FieldDate = InputField.extend({ * @override */ activate: function () { - if (this.datewidget) { + if (this.isFocusable() && this.datewidget) { this.datewidget.focus(); return true; } -- cgit v1.2.3