mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
a5900d34ff
closes #3040, fixes #3038 - Properly trim title - Re-add casper test/adjust where necessary - Rename gh-focus-input component
13 lines
292 B
JavaScript
13 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;
|