Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix editor opening when empty @ symbol is present
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Aug 25, 2022
commit b7f3f3927b2c7d8a1d1e5693695fe22d93bafcc3
9 changes: 8 additions & 1 deletion src/components/Mention/suggestion.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default {
onUpdate(props) {
component.updateProps(props)

if (!props.clientRect) {
if (!props.clientRect || !popup) {
return
}

Expand All @@ -60,6 +60,10 @@ export default {
},

onKeyDown(props) {
if (!popup) {
return
}

if (props.event.key === 'Escape') {
popup[0].hide()

Expand All @@ -70,6 +74,9 @@ export default {
},

onExit() {
if (!popup) {
return
}
popup[0].destroy()
component.destroy()
},
Expand Down