[FIX] incorrect reversion of m2o autocomplete mouse-based selection fix by revision vta@openerp.com-20120808154422-nbjabrc3cxcb030g
bzr revid: xmo@openerp.com-20120905120455-92llmuwv267xdrn5
This commit is contained in:
parent
dc6b5e92bf
commit
80daa1b956
|
@ -2846,7 +2846,21 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
|
|||
self.tip_def.reject();
|
||||
}
|
||||
};
|
||||
this.$input.focusout(anyoneLoosesFocus);
|
||||
var ignore_blur = false;
|
||||
this.$input.on({
|
||||
focusout: anyoneLoosesFocus,
|
||||
focus: function () { self.trigger('focused'); },
|
||||
autocompleteopen: function () { ignore_blur = true; },
|
||||
autocompleteclose: function () { ignore_blur = false; },
|
||||
blur: function () {
|
||||
// autocomplete open
|
||||
if (ignore_blur) { return; }
|
||||
if (_(self.getChildren()).any(function (child) {
|
||||
return child instanceof instance.web.form.AbstractFormPopup;
|
||||
})) { return; }
|
||||
self.trigger('blurred');
|
||||
}
|
||||
});
|
||||
|
||||
var isSelecting = false;
|
||||
// autocomplete
|
||||
|
@ -2888,7 +2902,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
|
|||
}
|
||||
isSelecting = false;
|
||||
});
|
||||
this.setupFocus(this.$input.add(this.$follow_button));
|
||||
this.setupFocus(this.$follow_button);
|
||||
},
|
||||
render_value: function(no_recurse) {
|
||||
var self = this;
|
||||
|
|
Loading…
Reference in New Issue