Fix broken composer extensibility

This commit is contained in:
Toby Zerner 2015-05-18 10:55:07 +09:30
parent e1a96fc284
commit 895fad928d

View File

@ -22,7 +22,7 @@ export default class ComposerBody extends Component {
}
view(className) {
return m('div', {className, config: this.element}, [
return m('div', {className, config: this.onload.bind(this)}, [
avatar(this.props.user, {className: 'composer-avatar'}),
m('div.composer-body', [
m('ul.composer-header', listItems(this.headerItems().toArray())),
@ -32,6 +32,10 @@ export default class ComposerBody extends Component {
]);
}
onload(element) {
this.element(element);
}
focus() {
var $input = this.$().find(':input:enabled:visible:first');
if ($input.length) {