mirror of
https://github.com/flarum/framework.git
synced 2025-04-26 22:54:03 +08:00
Fix broken composer extensibility
This commit is contained in:
parent
0037383d9f
commit
d9e97bc149
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user