mirror of
https://github.com/flarum/core.git
synced 2025-07-21 00:31:17 +02:00
Fix broken composer extensibility
This commit is contained in:
@@ -22,7 +22,7 @@ export default class ComposerBody extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
view(className) {
|
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'}),
|
avatar(this.props.user, {className: 'composer-avatar'}),
|
||||||
m('div.composer-body', [
|
m('div.composer-body', [
|
||||||
m('ul.composer-header', listItems(this.headerItems().toArray())),
|
m('ul.composer-header', listItems(this.headerItems().toArray())),
|
||||||
@@ -32,6 +32,10 @@ export default class ComposerBody extends Component {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onload(element) {
|
||||||
|
this.element(element);
|
||||||
|
}
|
||||||
|
|
||||||
focus() {
|
focus() {
|
||||||
var $input = this.$().find(':input:enabled:visible:first');
|
var $input = this.$().find(':input:enabled:visible:first');
|
||||||
if ($input.length) {
|
if ($input.length) {
|
||||||
|
Reference in New Issue
Block a user