1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +02:00

Tweak user bio editing styles

This commit is contained in:
Toby Zerner
2015-03-17 17:01:19 +10:30
parent cce21bb184
commit 066f9df18f
3 changed files with 20 additions and 12 deletions

View File

@@ -24,10 +24,14 @@ export default Ember.Component.extend({
this.set('editing', true);
var component = this;
var height = this.$().height();
Ember.run.scheduleOnce('afterRender', this, function() {
this.$('textarea').focus().blur(function() {
var save = function(e) {
if (e.shiftKey) { return; }
e.preventDefault();
component.send('save', $(this).val());
});
};
this.$('textarea').css('height', height).focus().bind('blur', save).bind('keydown', 'return', save);
});
},