mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 19:52:01 +03:00
8ab1ed1f13
closes #3040, fixes #3038 - Properly trim title - Re-add casper test/adjust where necessary - Rename gh-focus-input component
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;
|