diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2015-07-03 09:05:20 +0200 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2015-07-06 11:55:01 +0200 |
| commit | b5d7e663b43d5bf12f8fdcfa6fb8bd1330f4045a (patch) | |
| tree | 258e2f42b91788d17f89ac29bacd5619fe933987 /addons/web/static/src/js | |
| parent | baa51efdc92b0f5bf1700ef849b20d115796f92a (diff) | |
[FIX] web: readonly field and tab
When we go from one field to another via the tab key, in the form view what happens is:
{{we get a blur from the current field}}
-> if [[widget was not in state clicked (which can be gotten for example by clicking on a focused field)]]
-> blur event is cancelled,
-> the blur event is set to be triggered soon
-> the clicked state is set to false
{{we may get a focus for the next field}}
-> if [next field get an onfocus event]
-> blur event is cancelled,
So if :
- the state is not clicked and,
- the next field don't get an focus event.
We get a blur event which will either save (if a field value has been changed) or cancel
the form view editing and will hide the current edition, hence losing the focus.
For example, it happens on a readonly fields with field containing an `<a />` tag, on
some browser (for example google chrome), the focus event will not get triggered (it still
work if we were in a clicked state) so we can't cycle thought a list editable cells if there is a readonly field in it.
closes #7446
opw-643718
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/view_list_editable.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js index 2879804ee63..a0a2010d5cc 100644 --- a/addons/web/static/src/js/view_list_editable.js +++ b/addons/web/static/src/js/view_list_editable.js @@ -659,6 +659,7 @@ e.preventDefault(); return this._next(); } + this.editor.form.__clicked_inside = true; return $.when(); } }); |
