14 lines
292 B
JavaScript
14 lines
292 B
JavaScript
|
var TrimFocusInput = Ember.TextField.extend({
|
||
|
setFocus: function () {
|
||
|
this.$().val(this.$().val()).focus();
|
||
|
}.on('didInsertElement'),
|
||
|
|
||
|
focusOut: function () {
|
||
|
var text = this.$().val();
|
||
|
|
||
|
this.$().val(text.trim());
|
||
|
}
|
||
|
});
|
||
|
|
||
|
export default TrimFocusInput;
|