summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/fields/relational_fields.js18
1 files changed, 5 insertions, 13 deletions
diff --git a/addons/web/static/src/js/fields/relational_fields.js b/addons/web/static/src/js/fields/relational_fields.js
index 55ed1ecb731..01d4332ee36 100644
--- a/addons/web/static/src/js/fields/relational_fields.js
+++ b/addons/web/static/src/js/fields/relational_fields.js
@@ -3046,11 +3046,14 @@ var FieldRadio = FieldSelection.extend({
//--------------------------------------------------------------------------
/**
+ * Returns the currently-checked radio button, or the first one if no radio
+ * button is checked.
+ *
* @override
- * @returns {jQuery}
*/
getFocusableElement: function () {
- return this.mode === 'edit' && this.$input || this.$el;
+ var checked = this.$("[checked='true']");
+ return checked.length ? checked : this.$("[data-index='0']");
},
/**
@@ -3062,17 +3065,6 @@ var FieldRadio = FieldSelection.extend({
},
/**
- * Returns the currently-checked radio button, or the first one if no radio
- * button is checked.
- *
- * @override
- */
- getFocusableElement: function () {
- var checked = this.$("[checked='true']");
- return checked.length ? checked : this.$("[data-index='0']");
- },
-
- /**
* Associates the 'for' attribute to the radiogroup, instead of the selected
* radio button.
*