Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFerdinand Thiessen <rpm@fthiessen.de>2022-06-15 11:27:44 +0300
committerFerdinand Thiessen <rpm@fthiessen.de>2022-06-15 11:32:20 +0300
commit91c56488856bff8e077731c5107cefdf5556ac8a (patch)
treed4286a1200932e9b95cc52d920cb27f92c248f1d /src/components/Menu
parent04203d5e2e31be4ce1a928239ed9e45763646c16 (diff)
Fix formatting help modal not triggered if button is in submenu
When the formatting help button is pushed into the hidden actions, meaning the submenu for low resolution displays, the help modal is not shown as the click event is intercepted. This is fixed by checking the menu entry for a click listener before intercepting the event. Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
Diffstat (limited to 'src/components/Menu')
-rw-r--r--src/components/Menu/ActionList.vue8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/Menu/ActionList.vue b/src/components/Menu/ActionList.vue
index 6650faebf..d992b0b25 100644
--- a/src/components/Menu/ActionList.vue
+++ b/src/components/Menu/ActionList.vue
@@ -83,8 +83,12 @@ export default {
// nothing todo
},
onTrigger(entry) {
- this.$editor.chain().focus().run()
- this.$emit('trigged', entry)
+ if (entry?.click) {
+ entry.click(this)
+ } else {
+ this.$editor.chain().focus().run()
+ this.$emit('trigged', entry)
+ }
},
},
}