mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-25 05:29:07 +01:00
Prevent users from opening note menu when already opened (#5367)
This commit is contained in:
parent
d3eeb1c8c1
commit
d5e9ca94b7
@ -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() {
|
||||
|
@ -227,6 +227,7 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
closed() {
|
||||
this.$emit('closed');
|
||||
this.$nextTick(() => {
|
||||
this.destroyDom();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user