fix(ui): stop question mark propagation (#2209)

zio/stable
Joaquín Sánchez 2023-07-10 11:29:42 +02:00 committed by GitHub
parent a08d9d147c
commit 2506c02c39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -200,6 +200,11 @@ defineExpose({
}, },
}) })
function stopQuestionMarkPropagation(e: KeyboardEvent) {
if (e.key === '?')
e.stopImmediatePropagation()
}
onDeactivated(() => { onDeactivated(() => {
clearEmptyDrafts() clearEmptyDrafts()
}) })
@ -272,6 +277,7 @@ onDeactivated(() => {
:editor="editor" :editor="editor"
flex max-w-full 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' : ''" :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"
/> />
</div> </div>