fix: restore mention keyboard shortcuts
This commit is contained in:
parent
a319aa0eff
commit
92ac0fafc6
1 changed files with 4 additions and 6 deletions
|
|
@ -269,12 +269,10 @@ const TicketMentionExtension = Mention.extend({
|
|||
}
|
||||
},
|
||||
addKeyboardShortcuts() {
|
||||
const mentionPrototype = Mention as unknown as {
|
||||
prototype: { addKeyboardShortcuts?: (this: unknown) => unknown }
|
||||
}
|
||||
const parentShortcuts = mentionPrototype.prototype.addKeyboardShortcuts?.call(this) as
|
||||
| Record<string, (args: { editor: Editor }) => boolean>
|
||||
| undefined
|
||||
// Reuse base Mention keyboard shortcuts when extending the extension.
|
||||
const parentShortcuts = (this as unknown as {
|
||||
parent?: () => Record<string, (args: { editor: Editor }) => boolean>
|
||||
}).parent?.()
|
||||
const parent = parentShortcuts ?? {}
|
||||
return {
|
||||
...parent,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue