[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>
This commit is contained in:
committed by
Barad Mahendra
parent
4cc8fe2a98
commit
d5cd02fcbb
@@ -3048,6 +3048,14 @@ var FieldRadio = FieldSelection.extend({
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @override
|
||||
* @returns {jQuery}
|
||||
*/
|
||||
getFocusableElement: function () {
|
||||
return this.mode === 'edit' && this.$input || this.$el;
|
||||
},
|
||||
|
||||
/**
|
||||
* @override
|
||||
* @returns {boolean} always true
|
||||
|
||||
Reference in New Issue
Block a user