Commit 29fd1305 authored by Phil Hughes's avatar Phil Hughes

enable meta+enter shortcut to quick submit

parent df7c9011
<script>
import updateMixin from '../mixins/update';
import eventHub from '../event_hub';
export default {
mixins: [updateMixin],
props: {
canDestroy: {
type: Boolean,
......@@ -23,10 +25,6 @@
},
},
methods: {
updateIssuable() {
this.formState.updateLoading = true;
eventHub.$emit('update.issuable');
},
closeForm() {
eventHub.$emit('close.form');
},
......
<script>
/* global Flash */
import updateMixin from '../../mixins/update';
import markdownField from '../../../vue_shared/components/markdown/field.vue';
export default {
mixins: [updateMixin],
props: {
formState: {
type: Object,
......@@ -44,7 +46,8 @@
v-model="formState.description"
ref="textarea"
slot="textarea"
placeholder="Write a comment or drag your files here...">
placeholder="Write a comment or drag your files here..."
@keydown.meta.enter="updateIssuable">
</textarea>
</markdown-field>
</div>
......
<script>
import updateMixin from '../../mixins/update';
export default {
mixins: [updateMixin],
props: {
formState: {
type: Object,
......@@ -22,6 +25,7 @@
type="text"
placeholder="Issue title"
aria-label="Issue title"
v-model="formState.title" />
v-model="formState.title"
@keydown.meta.enter="updateIssuable" />
</fieldset>
</template>
import eventHub from '../event_hub';
export default {
methods: {
updateIssuable() {
this.formState.updateLoading = true;
eventHub.$emit('update.issuable');
},
},
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment