From 8c0965c775ab672cf1a2c24f161bad35da71da4c Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Wed, 19 Jul 2023 16:43:18 +0200 Subject: [PATCH] fix: make nested toolbar working for signature editor Signed-off-by: Daniel Kesselberg --- src/components/AccountSettings.vue | 11 ++++++++++- src/components/SignatureSettings.vue | 6 +++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/components/AccountSettings.vue b/src/components/AccountSettings.vue index 34667ed214..09fab910df 100644 --- a/src/components/AccountSettings.vue +++ b/src/components/AccountSettings.vue @@ -26,6 +26,7 @@ {{ t('mail', 'A signature is added to the text of new messages and replies.') }}

- +

@@ -146,6 +147,11 @@ export default { default: false, }, }, + data() { + return { + trapElements: [], + } + }, computed: { menu() { return this.buildMenu() @@ -171,6 +177,9 @@ export default { updateOpen() { this.$emit('update:open') }, + handleShowToolbar(element) { + this.trapElements.push(element) + }, }, } diff --git a/src/components/SignatureSettings.vue b/src/components/SignatureSettings.vue index ee2912054a..f7449b2b7b 100644 --- a/src/components/SignatureSettings.vue +++ b/src/components/SignatureSettings.vue @@ -44,7 +44,8 @@ v-model="signature" :html="true" :placeholder="t('mail', 'Signature …')" - :bus="bus" /> + :bus="bus" + @show-toolbar="handleShowToolbar" />

{{ t('mail', 'Your signature is larger than 2 MB. This may affect the performance of your editor.') }}

@@ -180,6 +181,9 @@ export default { throw error }) }, + handleShowToolbar(event) { + this.$emit('show-toolbar', event) + }, }, }