fix: restore mention keyboard shortcuts

This commit is contained in:
codex-bot 2025-10-24 13:12:55 -03:00
parent a319aa0eff
commit 92ac0fafc6

View file

@ -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,