diff options
| author | Aya Morisawa <AyaMorisawa4869@gmail.com> | 2019-09-02 04:45:01 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-09-02 04:45:01 +0900 |
| commit | 701fee3139d9be9641597a36f32731ebcff68efc (patch) | |
| tree | c7714ccaa892350b998ea59daa9b0fe13d31d04d /src/client/app/common/scripts | |
| parent | Proxy for SMTP (#5371) (diff) | |
| download | sharkey-701fee3139d9be9641597a36f32731ebcff68efc.tar.gz sharkey-701fee3139d9be9641597a36f32731ebcff68efc.tar.bz2 sharkey-701fee3139d9be9641597a36f32731ebcff68efc.zip | |
Prevent users from opening note menu when already opened (#5367)
Diffstat (limited to 'src/client/app/common/scripts')
| -rw-r--r-- | src/client/app/common/scripts/note-mixin.ts | 10 |
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 e433ba49cf..9e1c81e2b7 100644 --- a/src/client/app/common/scripts/note-mixin.ts +++ b/src/client/app/common/scripts/note-mixin.ts @@ -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() { |