Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix: keep shortcuts dialog open on registration failure

Yauheni Bandziukevichff40a73a1bdc
diff --git a/src/components/video-editor/ShortcutsConfigDialog.tsx b/src/components/video-editor/ShortcutsConfigDialog.tsx
index c29bc4449..088778269 100644
--- a/src/components/video-editor/ShortcutsConfigDialog.tsx
+++ b/src/components/video-editor/ShortcutsConfigDialog.tsx
@@ -102,14 +102,14 @@ export function ShortcutsConfigDialog() {
const handleCancelConflict = useCallback(() => setConflict(null), []);
const handleSave = useCallback(async () => {
- setShortcuts(draft);
const success = await persistShortcuts(draft);
if (success) {
+ setShortcuts(draft);
toast.success(t("savedToast"));
+ closeConfig();
} else {
toast.error(t("registrationFailed"));
}
- closeConfig();
}, [draft, setShortcuts, persistShortcuts, closeConfig, t]);
const handleReset = useCallback(() => {