summaryrefslogtreecommitdiff
path: root/addons/web/static
diff options
context:
space:
mode:
authorNidhi Patel <nia@odoo.com>2020-07-10 05:03:05 +0000
committerBarad Mahendra <mba@openerp.com>2020-08-05 12:56:25 +0000
commitd5cd02fcbb3b8318dcaf4928112a2575daf2f379 (patch)
tree547dcf2aeab4dced79cfada5536fdf9fabb2a3bb /addons/web/static
parent4cc8fe2a98761e379ec0e0eb0b81a1dc284cf36d (diff)
[FIX] web: Fix the skiped focus on radio
Currently, when form view is opened in edit mode and if you proceed through the tab(keyboard) then focus is skiped on radio field. For Ex: in project when you procceed through the tab it will skip the visibility field radio. The issue occurs because the radio is inherited from the selection field and in selection field the focus is set on 'select' while there is no method to set the focus in radio and radio does not have 'select' element it has 'input' So in this commit, override the method getFocusableElement in radio widget and set the focus on 'input' instead of 'select'. closes odoo/odoo#52073 Taskid: 2252798 Closes: #52073 Related: odoo/upgrade#1430 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/web/static')
-rw-r--r--addons/web/static/src/js/fields/relational_fields.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/web/static/src/js/fields/relational_fields.js b/addons/web/static/src/js/fields/relational_fields.js
index 5c557dca239..f4677ac7190 100644
--- a/addons/web/static/src/js/fields/relational_fields.js
+++ b/addons/web/static/src/js/fields/relational_fields.js
@@ -3050,6 +3050,14 @@ var FieldRadio = FieldSelection.extend({
/**
* @override
+ * @returns {jQuery}
+ */
+ getFocusableElement: function () {
+ return this.mode === 'edit' && this.$input || this.$el;
+ },
+
+ /**
+ * @override
* @returns {boolean} always true
*/
isSet: function () {