diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2018-07-21 02:16:11 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-21 02:16:11 +0900 |
| commit | bc8bea11c06eca7d33860166db2dd91c034ea0fe (patch) | |
| tree | b1fbac3bcd3df272a148ff8acf67ff31196b785b | |
| parent | Merge pull request #1938 from acid-chicken/vscode (diff) | |
| parent | Update post-form.vue (diff) | |
| download | sharkey-bc8bea11c06eca7d33860166db2dd91c034ea0fe.tar.gz sharkey-bc8bea11c06eca7d33860166db2dd91c034ea0fe.tar.bz2 sharkey-bc8bea11c06eca7d33860166db2dd91c034ea0fe.zip | |
Merge pull request #1940 from acid-chicken/acid-chicken-patch-1
投稿できない際にショートカットキーをトリガーしないようにする
3 files changed, 3 insertions, 3 deletions
diff --git a/src/client/app/common/views/components/messaging-room.form.vue b/src/client/app/common/views/components/messaging-room.form.vue index 050906cf44..b6ca902660 100644 --- a/src/client/app/common/views/components/messaging-room.form.vue +++ b/src/client/app/common/views/components/messaging-room.form.vue @@ -119,7 +119,7 @@ export default Vue.extend({ }, onKeypress(e) { - if ((e.which == 10 || e.which == 13) && e.ctrlKey) { + if ((e.which == 10 || e.which == 13) && e.ctrlKey && this.canSend) { this.send(); } }, diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue index aaec36ed37..8b1fd3b8ca 100644 --- a/src/client/app/desktop/views/components/post-form.vue +++ b/src/client/app/desktop/views/components/post-form.vue @@ -244,7 +244,7 @@ export default Vue.extend({ }, onKeydown(e) { - if ((e.which == 10 || e.which == 13) && (e.ctrlKey || e.metaKey)) this.post(); + if ((e.which == 10 || e.which == 13) && (e.ctrlKey || e.metaKey) && this.canPost) this.post(); }, onPaste(e) { diff --git a/src/client/app/desktop/views/widgets/post-form.vue b/src/client/app/desktop/views/widgets/post-form.vue index 3c4ade0e81..618d19efc4 100644 --- a/src/client/app/desktop/views/widgets/post-form.vue +++ b/src/client/app/desktop/views/widgets/post-form.vue @@ -45,7 +45,7 @@ export default define({ this.save(); }, onKeydown(e) { - if ((e.which == 10 || e.which == 13) && (e.ctrlKey || e.metaKey)) this.post(); + if ((e.which == 10 || e.which == 13) && (e.ctrlKey || e.metaKey) && !this.posting && this.text) this.post(); }, post() { this.posting = true; |