summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2017-05-20 22:51:52 +0200
committerGéry Debongnie <ged@odoo.com>2017-05-22 10:07:32 +0200
commit8436150ae5820f1bde403c912ab1f9945e327d99 (patch)
treee04748acee6bc3288d1d58f7744c3a090e0177f7 /addons/web/static/src/js/views/basic/basic_controller.js
parent3adfa84cd60e289407c956661591b0d172e8012b (diff)
[FIX] web: bad interaction between m2o, onchange and editable list
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) * user press ENTER again * the onchange comes back * 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 (after the first ENTER). The second ENTER caused a unselectRow in the editable list, so the input was focusouted, and the modal is set. This is basically caused by the asynchronous behaviour of the onchange. We simply fix the problem by setting the floating flag back to false in the keydown method.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions