summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts/note-mixin.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/app/common/scripts/note-mixin.ts')
-rw-r--r--src/client/app/common/scripts/note-mixin.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/client/app/common/scripts/note-mixin.ts b/src/client/app/common/scripts/note-mixin.ts
index 9e1c81e2b7..54e90714e7 100644
--- a/src/client/app/common/scripts/note-mixin.ts
+++ b/src/client/app/common/scripts/note-mixin.ts
@@ -143,12 +143,15 @@ export default (opts: Opts = {}) => ({
react(viaKeyboard = false) {
pleaseLogin(this.$root);
this.blur();
- this.$root.new(MkReactionPicker, {
+ const w = this.$root.new(MkReactionPicker, {
source: this.$refs.reactButton,
note: this.appearNote,
showFocus: viaKeyboard,
animation: !viaKeyboard
}).$once('closed', this.focus);
+ this.$once('hook:beforeDestroy', () => {
+ w.close();
+ });
},
reactDirectly(reaction) {
@@ -195,7 +198,7 @@ export default (opts: Opts = {}) => ({
menu(viaKeyboard = false) {
if (this.openingMenu) return;
this.openingMenu = true;
- this.$root.new(MkNoteMenu, {
+ const w = this.$root.new(MkNoteMenu, {
source: this.$refs.menuButton,
note: this.appearNote,
animation: !viaKeyboard
@@ -203,6 +206,9 @@ export default (opts: Opts = {}) => ({
this.openingMenu = false;
this.focus();
});
+ this.$once('hook:beforeDestroy', () => {
+ w.destroyDom();
+ });
},
toggleShowContent() {