From 2506c02c3962e9df1e6fe85866e52c0e363cd1f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Mon, 10 Jul 2023 11:29:42 +0200 Subject: [PATCH] fix(ui): stop question mark propagation (#2209) --- components/publish/PublishWidget.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/publish/PublishWidget.vue b/components/publish/PublishWidget.vue index f15bca45..eee1c1a7 100644 --- a/components/publish/PublishWidget.vue +++ b/components/publish/PublishWidget.vue @@ -200,6 +200,11 @@ defineExpose({ }, }) +function stopQuestionMarkPropagation(e: KeyboardEvent) { + if (e.key === '?') + e.stopImmediatePropagation() +} + onDeactivated(() => { clearEmptyDrafts() }) @@ -272,6 +277,7 @@ onDeactivated(() => { :editor="editor" flex max-w-full :class="shouldExpanded ? 'min-h-30 md:max-h-[calc(100vh-200px)] sm:max-h-[calc(100vh-400px)] max-h-35 of-y-auto overscroll-contain' : ''" + @keydown="stopQuestionMarkPropagation" />