mirror of
https://github.com/flarum/framework.git
synced 2024-11-23 13:30:47 +08:00
Fix broken composer extensibility
This commit is contained in:
parent
e1a96fc284
commit
895fad928d
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user