[FIX] focusing of form fields, implementation of focusing for tag m2m
authorXavier Morel <xmo@openerp.com>
Tue, 11 Dec 2012 14:56:52 +0000 (15:56 +0100)
committerXavier Morel <xmo@openerp.com>
Tue, 11 Dec 2012 14:56:52 +0000 (15:56 +0100)
commitbc8e74d8b04bc3b5a6ad23172822a3230e10baac
tree17335aa0184e44868ff69ffec30cf7c3d0b338c8
parent6576b52d42d82314df474bbfea259f394822846a
[FIX] focusing of form fields, implementation of focusing for tag m2m

jQuery's *focus* method must *not* be used: it triggers the blur and
focus events in the wrong order (and potentially more than once),
breaking the focus handling of the o2m editable list and making it
essentially unusable.

The DOM method behaves correctly, triggers the blur first and the
focus second in a different runloop frame (thus it's possible to bind
on blur, wait a set time and execute the actual blurring iif no focus
event has been seen within the form).

bzr revid: xmo@openerp.com-20121211145652-y63a0ny0gmoiozhn
addons/web/static/src/js/view_form.js