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() {
|
addKeyboardShortcuts() {
|
||||||
const mentionPrototype = Mention as unknown as {
|
// Reuse base Mention keyboard shortcuts when extending the extension.
|
||||||
prototype: { addKeyboardShortcuts?: (this: unknown) => unknown }
|
const parentShortcuts = (this as unknown as {
|
||||||
}
|
parent?: () => Record<string, (args: { editor: Editor }) => boolean>
|
||||||
const parentShortcuts = mentionPrototype.prototype.addKeyboardShortcuts?.call(this) as
|
}).parent?.()
|
||||||
| Record<string, (args: { editor: Editor }) => boolean>
|
|
||||||
| undefined
|
|
||||||
const parent = parentShortcuts ?? {}
|
const parent = parentShortcuts ?? {}
|
||||||
return {
|
return {
|
||||||
...parent,
|
...parent,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue