diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2020-01-16 02:06:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-16 02:06:56 +0300 |
commit | 88888fe433d599ecb653a3ff3439e46b3a5e3877 (patch) | |
tree | a2b28537220c91b9993a2f33994943efa5be54ce | |
parent | 83a775678613e29c0e7879135f51f5f49602d2a2 (diff) | |
parent | 5c13c5f868a084e150c8000c323705f1060fd159 (diff) |
Merge pull request #2479 from nextcloud/reply_issuesnightly-20200115
Focus editor in replies and forwdared messagess
-rw-r--r-- | src/components/Composer.vue | 8 | ||||
-rw-r--r-- | src/components/TextEditor.vue | 7 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/components/Composer.vue b/src/components/Composer.vue index 78334613c..bcb48ca6f 100644 --- a/src/components/Composer.vue +++ b/src/components/Composer.vue @@ -109,6 +109,7 @@ name="body" class="message-body" :placeholder="t('mail', 'Write message …')" + :focus="isReply" @input="onInputChanged" ></TextEditor> <TextEditor @@ -119,6 +120,7 @@ name="body" class="message-body" :placeholder="t('mail', 'Write message …')" + :focus="isReply" @input="onInputChanged" ></TextEditor> </div> @@ -215,10 +217,6 @@ export default { TextEditor, }, props: { - replyTo: { - type: Object, - default: () => undefined, - }, fromAccount: { type: Number, default: () => undefined, @@ -289,7 +287,7 @@ export default { return this.newRecipients.concat(this.autocompleteRecipients) }, isReply() { - return this.replyTo !== undefined + return this.to.length > 0 }, noSubject() { return this.subjectVal === '' && this.bodyVal !== '' diff --git a/src/components/TextEditor.vue b/src/components/TextEditor.vue index 3754bccdc..10f21f32f 100644 --- a/src/components/TextEditor.vue +++ b/src/components/TextEditor.vue @@ -62,6 +62,10 @@ export default { type: String, default: '', }, + focus: { + type: Boolean, + default: false, + }, }, data() { return { @@ -127,6 +131,9 @@ export default { priority: 'highest', } ) + if (this.focus) { + logger.debug('focusing TextEditor') + } // Set value as late as possible, so the custom schema listener is used // for the initial editor model |