summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorVincent Schippefilt <vsc@odoo.com>2018-09-25 20:48:22 +0200
committerVincent Schippefilt <vsc@odoo.com>2018-09-26 11:43:38 +0200
commitc2b4790be426f039ec47b0888b5e58c7970c3dae (patch)
treefc50a2ce4b3368adcab63f42aab7fe6edd844c2f /addons/web/static/src/js/fields/basic_fields.js
parent046837b9a103a5994efb251d1874d6b9018def51 (diff)
[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)
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
-rw-r--r--addons/web/static/src/js/fields/basic_fields.js2
1 files changed, 1 insertions, 1 deletions
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;
}