diff options
| author | Géry Debongnie <ged@odoo.com> | 2017-05-20 22:15:48 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2017-05-22 10:07:32 +0200 |
| commit | 3adfa84cd60e289407c956661591b0d172e8012b (patch) | |
| tree | ba2962dbd81b1a327039e033dd28b42482d9cb04 /addons/web/static/src/js/views/basic | |
| parent | 28eadb3d6ee11bcee9bfe498387467c70953382a (diff) | |
[FIX] web: improve many2one edition with onchanges
When a many2one (in an editable list) with an onchange was edited, it
could happen that a modal window asking for confirmation of the creation
of a record was opened when it should not. Here is what actually could
happen:
* user focus a many2one
* user type something
* user press ENTER (keydown + keyup)
* the onchange comes back
* user press ENTER again
* modal window is open
Because of the onchange, the _reset method was called after the
_onInputKeyup method. So, the m2o_value was not equal to the $input.val() and
the 'floating' flag was set to true, which means that the _onInputFocusout
method (called indirectly by the listeditablerenderer when unselecting the row)
was forced to open a confirm dialog.
We simply fix the problem by setting the floating flag back to false in the
reset method.
Diffstat (limited to 'addons/web/static/src/js/views/basic')
0 files changed, 0 insertions, 0 deletions
