[CHG] select all field content when focusing integer or float field

bzr revid: xmo@openerp.com-20120808154126-wy9b96px9fasmu7e
This commit is contained in:
Xavier Morel 2012-08-08 17:41:26 +02:00
parent 163b211e12
commit 065ffcd244
1 changed files with 4 additions and 1 deletions

View File

@ -2085,7 +2085,7 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we
return this.get('value') === '' || this._super(); return this.get('value') === '' || this._super();
}, },
focus: function() { focus: function() {
this.$element.find('input:first').focus(); this.$('input:first').focus();
} }
}); });
@ -2169,6 +2169,9 @@ instance.web.form.FieldFloat = instance.web.form.FieldChar.extend({
value_ = 0; value_ = 0;
} }
this._super.apply(this, [value_]); this._super.apply(this, [value_]);
},
focus: function () {
this.$('input:first').select();
} }
}); });