Skip to content

Commit 0d0f06e

Browse files
committed
Prevent description reset when editing commit message
The value would reset when toggling between inline and modal view.
1 parent 54c0bb3 commit 0d0f06e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/desktop/src/components/CommitMessageEditor.svelte

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,11 @@
199199
{aiIsLoading}
200200
{suggestionsHandler}
201201
useRuler={uiState.global.useRuler.current}
202-
onChange={(text: string) => {
203-
onChange?.({ description: text });
202+
onChange={(value) => {
203+
// Updating the description prevents resetting the editor value
204+
// when toggling between inline and modal view.
205+
description = value;
206+
onChange?.({ description: value });
204207
}}
205208
onKeyDown={(e: KeyboardEvent) => {
206209
if (e.key === 'Tab' && e.shiftKey) {

0 commit comments

Comments
 (0)