diff options
| author | Mohammed Shekha <msh@odoo.com> | 2020-04-07 12:32:43 +0000 |
|---|---|---|
| committer | Lucas Perais (lpe) <lpe@odoo.com> | 2020-08-20 12:37:36 +0000 |
| commit | ce69db55f80777b95015c23dc4b3fa1a6db5daad (patch) | |
| tree | 66675d808acc37302397eb6b28df6bed20c50479 /addons/web/static/src/js/views/basic/basic_model.js | |
| parent | 538b7f22cfdd39ce3dea66b36b46ced2de7ceaed (diff) | |
[IMP] web: set focus to first visible page when active page invisible
Before this commit: if there are modifiers based on field which hides
one page and show another and if active page get invisible then instead
of first page second page gets focus, consider following example,
`<form>
<field name="boolean"/>
<page name="page1" attrs='{"invisible": [["bar", "=", false]]}'></page>
<page name="page2" attrs='{"invisible": [["bar", "=", true]]}'></page>
<page name="page3"></page>
</form>`
Consider the initial boolean value to be true; initially the first page
will be visible. But when "bar" is unchecked then page1 will be hidden
and page3 will get the focus as page2 is still not visible: it will be
after the computaion/application of all modifiers, which is currently
done after the rendering of a tab page.
Now: the first visible tab is focused on rendering (same as before) but
also after all modifiers have been updated.
closes odoo/odoo#56209
X-original-commit: 10365572aa3629e9b19d2b29726b351275de9f52
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Ipsita Borisagar <ibo@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
0 files changed, 0 insertions, 0 deletions
