Skip to content

Commit

Permalink
fix(ui): stop question mark propagation (#2209)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Jul 10, 2023
1 parent a08d9d1 commit 2506c02
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/publish/PublishWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@ defineExpose({
},
})
function stopQuestionMarkPropagation(e: KeyboardEvent) {
if (e.key === '?')
e.stopImmediatePropagation()
}
onDeactivated(() => {
clearEmptyDrafts()
})
Expand Down Expand Up @@ -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"
/>
</div>
Expand Down

0 comments on commit 2506c02

Please sign in to comment.