diff --git a/src/routes/_components/compose/ComposeInput.html b/src/routes/_components/compose/ComposeInput.html index ca08ca98..f99f204e 100644 --- a/src/routes/_components/compose/ComposeInput.html +++ b/src/routes/_components/compose/ComposeInput.html @@ -68,12 +68,14 @@ } from '../../_actions/autosuggest' import { observe } from 'svelte-extras' import { get } from '../../_utils/lodash-lite' + import { on } from '../../_utils/eventBus' export default { oncreate () { this.setupSyncFromStore() this.setupSyncToStore() this.setupAutosize() + this.setupResize() }, ondestroy () { this.teardownAutosize() @@ -225,6 +227,13 @@ }) event.preventDefault() event.stopPropagation() + }, + setupResize () { + on('resizeComposeInput', this, realm => { + if (realm === this.get().realm) { + autosize.update(this.refs.textarea) + } + }) } }, store: () => store, diff --git a/src/routes/_components/dialog/components/ComposeDialog.html b/src/routes/_components/dialog/components/ComposeDialog.html index be98e51e..3040cd82 100644 --- a/src/routes/_components/dialog/components/ComposeDialog.html +++ b/src/routes/_components/dialog/components/ComposeDialog.html @@ -3,13 +3,14 @@ {label} {title} background="var(--main-bg)" + on:show="onShow()" > - +