[FIX] focus/blur in fieldm2mtags in case of tabbing in/out
bzr revid: xmo@openerp.com-20121114114508-g97xdgq4a4fhpmjz
This commit is contained in:
parent
e1f5dfc388
commit
01630d6800
|
@ -3992,13 +3992,18 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
|
|||
self._drop_shown = true;
|
||||
});
|
||||
self.tags = self.$text.textext()[0].tags();
|
||||
self.$text.focusout(function() {
|
||||
self.$text.trigger("setInputData", "");
|
||||
}).keydown(function(e) {
|
||||
if (e.which === $.ui.keyCode.TAB && self._drop_shown) {
|
||||
self.$text.textext()[0].autocomplete().selectFromDropdown();
|
||||
}
|
||||
});
|
||||
self.$text
|
||||
.focusin(function () {
|
||||
self.trigger('focused');
|
||||
})
|
||||
.focusout(function() {
|
||||
self.$text.trigger("setInputData", "");
|
||||
self.trigger('blurred');
|
||||
}).keydown(function(e) {
|
||||
if (e.which === $.ui.keyCode.TAB && self._drop_shown) {
|
||||
self.$text.textext()[0].autocomplete().selectFromDropdown();
|
||||
}
|
||||
});
|
||||
},
|
||||
set_value: function(value_) {
|
||||
value_ = value_ || [];
|
||||
|
|
Loading…
Reference in New Issue