summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-07-21 02:16:11 +0900
committerGitHub <noreply@github.com>2018-07-21 02:16:11 +0900
commitbc8bea11c06eca7d33860166db2dd91c034ea0fe (patch)
treeb1fbac3bcd3df272a148ff8acf67ff31196b785b
parentMerge pull request #1938 from acid-chicken/vscode (diff)
parentUpdate post-form.vue (diff)
downloadsharkey-bc8bea11c06eca7d33860166db2dd91c034ea0fe.tar.gz
sharkey-bc8bea11c06eca7d33860166db2dd91c034ea0fe.tar.bz2
sharkey-bc8bea11c06eca7d33860166db2dd91c034ea0fe.zip
Merge pull request #1940 from acid-chicken/acid-chicken-patch-1
投稿できない際にショートカットキーをトリガーしないようにする
-rw-r--r--src/client/app/common/views/components/messaging-room.form.vue2
-rw-r--r--src/client/app/desktop/views/components/post-form.vue2
-rw-r--r--src/client/app/desktop/views/widgets/post-form.vue2
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;