diff --git a/apps/frontend/src/components/ui/moderation/NewModerationChecklist.vue b/apps/frontend/src/components/ui/moderation/NewModerationChecklist.vue index c8ccab6ff..955b87dd0 100644 --- a/apps/frontend/src/components/ui/moderation/NewModerationChecklist.vue +++ b/apps/frontend/src/components/ui/moderation/NewModerationChecklist.vue @@ -511,7 +511,7 @@ interface MessagePart { function handleKeybinds(event: KeyboardEvent) { const focusedActionIndex = ref(null); - return handleKeybind( + handleKeybind( event, { project: props.project, @@ -1005,6 +1005,8 @@ async function generateMessage() { loadingMessage.value = true; + router.push(`/${props.project.project_type}/${props.project.slug}/moderation`); + try { const baseMessage = await assembleFullMessage(); let fullMessage = baseMessage; diff --git a/packages/moderation/types/keybinds.ts b/packages/moderation/types/keybinds.ts index dc36cc036..393985c77 100644 --- a/packages/moderation/types/keybinds.ts +++ b/packages/moderation/types/keybinds.ts @@ -99,7 +99,13 @@ export function handleKeybind( ctx: ModerationContext, keybinds: KeybindListener[], ): boolean { - if (event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement) { + if ( + event.target instanceof HTMLInputElement || + event.target instanceof HTMLTextAreaElement || + (event.target as HTMLElement)?.closest('.cm-editor') || + (event.target as HTMLElement)?.classList?.contains('cm-content') || + (event.target as HTMLElement)?.classList?.contains('cm-line') + ) { return false }