From 28b67ee7dcc29cf85722d18d971fd2a9cc439093 Mon Sep 17 00:00:00 2001 From: Martin Geubelle Date: Tue, 20 Jun 2017 10:26:18 +0200 Subject: [FIX] web: properly handle tab navigation with widgets in edit Rev. https://github.com/odoo/odoo/commit/c5f8f35747b4ca9633c664d6be74614c5ce22fcd introduced a regression: the input of widgets 'email' and 'url' was not correctly focused anymore with tab navigation. The method `getFocusableElement` on their common parent (`InputField`) has not been correctly overriden because `_super``was not called in edit mode. --- addons/web/static/src/js/fields/basic_fields.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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 79654cc3095..103509a7b53 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -828,7 +828,7 @@ var FieldEmail = InputField.extend({ * @override */ getFocusableElement: function () { - return this.mode === 'readonly' && this.$el || $(); + return this.mode === 'readonly' ? this.$el : this._super.apply(this, arguments); }, //-------------------------------------------------------------------------- @@ -940,7 +940,7 @@ var UrlWidget = InputField.extend({ * @override */ getFocusableElement: function () { - return this.mode === 'readonly' && this.$el || $(); + return this.mode === 'readonly' ? this.$el : this._super.apply(this, arguments); }, //-------------------------------------------------------------------------- -- cgit v1.2.3