[FIX] web: fix date picker fields do not capture the focus event when invisible
Before this fix, in form view, when a datepicker was not visible (because they were on another page or literally invisible), when the user pressed TAB and the datepicker was positionned after the current field in the form, it was capturing the focus during the activate phase of the navigation_move. This is not correct for invisible elements. After this fix, only focusable datepickers get the focus during the activation phase of the navigation_move. co-author: aab-odoo (aab@odoo.com)
This commit is contained in:
@@ -538,7 +538,7 @@ var FieldDate = InputField.extend({
|
||||
* @override
|
||||
*/
|
||||
activate: function () {
|
||||
if (this.datewidget) {
|
||||
if (this.isFocusable() && this.datewidget) {
|
||||
this.datewidget.focus();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user