diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-06-06 09:55:56 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-06-07 08:08:49 +0200 |
| commit | 25e701465081477a1bd31f448c1c4feb533f4a09 (patch) | |
| tree | 509554b1b5d2ef5283e09420268f9889c44c47e0 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 67747e6fa5f4c1b27eed5dfd7231001e98fb34c1 (diff) | |
[FIX] web: Form: correctly autofocus fields
The autofocus worked fine when switching from 'readonly' to 'edit',
but not when clicking on 'Create' from the multi-record view. This
was because in this case, we were trying to focus the field while
the view wasn't in the DOM yet. This rev. ensures that we wait for
the view to be appended to the DOM before trying to set the focus
on the default field.
Also ensures that the first visible field is correctly focused.
Before this rev., if the first field was invisible (or simply
not focusable), no field was focused.
Credit goes to @msh-odoo for the preliminary work.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
