summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorMartin Geubelle <mge@odoo.com>2017-06-20 10:26:18 +0200
committerMartin Geubelle <mge@odoo.com>2017-06-20 11:17:35 +0200
commit28b67ee7dcc29cf85722d18d971fd2a9cc439093 (patch)
treecf928572dc519c9a1ef32aa8048407d2a8206beb /addons/web/static/src/js
parent98100b85dc2ac7957b84ed1a8eec956478c27d20 (diff)
[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.
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/fields/basic_fields.js4
1 files changed, 2 insertions, 2 deletions
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);
},
//--------------------------------------------------------------------------