diff --git a/src/web/app/desktop/views/components/post-form-window.vue b/src/web/app/desktop/views/components/post-form-window.vue
index dc16d7c9da..77b47e20a1 100644
--- a/src/web/app/desktop/views/components/post-form-window.vue
+++ b/src/web/app/desktop/views/components/post-form-window.vue
@@ -10,7 +10,7 @@
@@ -39,6 +39,9 @@ export default Vue.extend({
},
onChangeMedia(media) {
this.media = media;
+ },
+ onPosted() {
+ (this.$refs.window as any).close();
}
}
});
diff --git a/src/web/app/desktop/views/components/ui.vue b/src/web/app/desktop/views/components/ui.vue
index 39ec057f88..76851a0f1e 100644
--- a/src/web/app/desktop/views/components/ui.vue
+++ b/src/web/app/desktop/views/components/ui.vue
@@ -21,7 +21,9 @@ export default Vue.extend({
},
methods: {
openPostForm() {
- document.body.appendChild(new MkPostFormWindow().$mount().$el);
+ document.body.appendChild(new MkPostFormWindow({
+ parent: this
+ }).$mount().$el);
},
onKeydown(e) {
if (e.target.tagName == 'INPUT' || e.target.tagName == 'TEXTAREA') return;