1
0
Fork 0
mirror of https://github.com/paricafe/misskey.git synced 2025-03-21 14:09:25 -05:00

Prevent users from opening note menu when already opened ()

This commit is contained in:
Aya Morisawa 2019-09-02 04:45:01 +09:00 committed by syuilo
parent 593c2b9517
commit 701fee3139
2 changed files with 9 additions and 2 deletions
src/client/app/common
scripts
views/components

View file

@ -27,7 +27,8 @@ export default (opts: Opts = {}) => ({
data() {
return {
showContent: false,
hideThisNote: false
hideThisNote: false,
openingMenu: false
};
},
@ -192,11 +193,16 @@ export default (opts: Opts = {}) => ({
},
menu(viaKeyboard = false) {
if (this.openingMenu) return;
this.openingMenu = true;
this.$root.new(MkNoteMenu, {
source: this.$refs.menuButton,
note: this.appearNote,
animation: !viaKeyboard
}).$once('closed', this.focus);
}).$once('closed', () => {
this.openingMenu = false;
this.focus();
});
},
toggleShowContent() {

View file

@ -227,6 +227,7 @@ export default Vue.extend({
},
closed() {
this.$emit('closed');
this.$nextTick(() => {
this.destroyDom();
});