diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000..36cfce106e --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,12 @@ +{ + "recommendations": [ + "ducksoupdev.vue2", + "editorconfig.editorconfig", + "eg2.tslint", + "eg2.vscode-npm-script", + "hollowtree.vue-snippets", + "ms-vscode.typescript-javascript-grammar", + "octref.vetur", + "sysoev.language-stylus" + ] +} 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;