fix: keybind issue + view moderation page on final step (#3977)
* fix: keybind issue + view moderation page on final step * fix: go to moderation page on generate message thing
This commit is contained in:
parent
a945e9b005
commit
6fb125cf0f
@ -511,7 +511,7 @@ interface MessagePart {
|
||||
function handleKeybinds(event: KeyboardEvent) {
|
||||
const focusedActionIndex = ref<number | null>(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;
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user