mirror of
https://github.com/flarum/framework.git
synced 2024-12-05 00:43:39 +08:00
Prevent re-showing the composer when it's already showing
This commit is contained in:
parent
0ceb5ebbde
commit
87d505499b
|
@ -34,12 +34,14 @@ class Composer extends Component {
|
|||
};
|
||||
classes.visible = this.position() === Composer.PositionEnum.NORMAL || classes.minimized || classes.fullScreen;
|
||||
|
||||
this.component && (this.component.props.disabled = classes.minimized);
|
||||
if (this.component) this.component.props.disabled = classes.minimized;
|
||||
|
||||
return m('div.composer', {config: this.onload.bind(this), className: classList(classes)}, [
|
||||
m('div.composer-handle', {config: this.configHandle.bind(this)}),
|
||||
m('ul.composer-controls', listItems(this.controlItems().toArray())),
|
||||
m('div.composer-content', {onclick: this.show.bind(this)}, this.component ? this.component.view() : '')
|
||||
m('div.composer-content', {onclick: () => {
|
||||
if (this.position() === Composer.PositionEnum.MINIMIZED) this.show();
|
||||
}}, this.component ? this.component.view() : '')
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user