mirror of
https://github.com/flarum/core.git
synced 2025-08-05 07:57:46 +02:00
Stop rendering previews when composer is hidden
This brings this component in line with the `ReplyPlaceholder` one.
This commit is contained in:
@@ -24,6 +24,10 @@ export default class ComposerPostPreview extends Component {
|
||||
// body with a preview.
|
||||
let preview;
|
||||
const updatePreview = () => {
|
||||
// Since we're polling, the composer may have been closed in the meantime,
|
||||
// so we bail in that case.
|
||||
if (!this.attrs.composer.isVisible()) return;
|
||||
|
||||
const content = this.attrs.composer.fields.content();
|
||||
|
||||
if (preview === content) return;
|
||||
|
Reference in New Issue
Block a user