Fix '%' mentioning if you escape out
This commit is contained in:
parent
e1350c084d
commit
1b7fd31b88
|
@ -61,10 +61,16 @@ export const contractMentionSuggestion: Suggestion = {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onKeyDown(props) {
|
onKeyDown(props) {
|
||||||
if (props.event.key === 'Escape') {
|
if (props.event.key)
|
||||||
popup?.[0].hide()
|
if (
|
||||||
return true
|
props.event.key === 'Escape' ||
|
||||||
}
|
// Also break out of the mention if the tooltip isn't visible
|
||||||
|
(props.event.key === 'Enter' && !popup?.[0].state.isShown)
|
||||||
|
) {
|
||||||
|
popup?.[0].destroy()
|
||||||
|
component?.destroy()
|
||||||
|
return false
|
||||||
|
}
|
||||||
return (component?.ref as any)?.onKeyDown(props)
|
return (component?.ref as any)?.onKeyDown(props)
|
||||||
},
|
},
|
||||||
onExit() {
|
onExit() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user