1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-25 18:56:52 +03:00

Cmd enter handling (#393)

This commit is contained in:
avele 2019-09-02 21:55:55 +04:00 committed by GitHub
parent c9d512cb08
commit 38725ca37c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -160,7 +160,10 @@
>
<v-layout column class="pa-3">
<v-flex>
<v-form @keydown.native.enter.ctrl="updateItemInfo">
<v-form
@keydown.native.enter.ctrl="updateItemInfo"
@keydown.native.enter.meta="updateItemInfo"
>
<v-text-field
v-model="itemNameEdit"
label="Name"

View File

@ -7,9 +7,10 @@
'markdown-editor_has-bottom-toolbar': bottomToolbar,
'markdown-editor_has-top-toolbar': toolbar
}"
@keydown.capture.enter="onEnterDown"
@keydown.ctrl.enter="onCtrlEnterDown"
@keydown.esc="cancel"
@keydown.exact.capture.enter="onEnterDown"
@keydown.exact.ctrl.enter="onCtrlEnterDown"
@keydown.exact.meta.enter="onCtrlEnterDown"
@keydown.exact.esc="cancel"
v-show="editor && isReady"
>
<textarea ref="editor" />
@ -80,7 +81,7 @@ export default class MarkdownEditor extends Vue {
isReady: boolean = false
get saveTip () {
return `press${this.saveOnEnter ? ' Enter or' : ''} Ctrl+Enter to save`
return `press${this.saveOnEnter ? ' Enter or' : ''} Ctrl/Cmd + Enter to save`
}
get heightValue () {