mirror of
https://github.com/flarum/framework.git
synced 2024-11-23 13:30:47 +08:00
Prevent re-showing the composer when it's already showing
This commit is contained in:
parent
b682cf1575
commit
e8e3bc005d
|
@ -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