Skip to content

Commit f32b963

Browse files
committed
update previous adjustment
1 parent 9b6d740 commit f32b963

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

web_src/js/features/comp/ComboMarkdownEditor.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,10 +378,9 @@ export class ComboMarkdownEditor {
378378

379379
if (this.easyMDE) {
380380
this.easyMDE.value(v);
381+
} else {
382+
this.textarea.value = v;
381383
}
382-
// Always update the underlying textarea so consumers remain in sync.
383-
this.textarea.value = v;
384-
this.textarea.dispatchEvent(new Event('input', {bubbles: true}));
385384
this.textareaAutosize?.resizeToFit();
386385
}
387386

web_src/js/features/repo-release.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,7 @@ function initGenerateReleaseNotes() {
106106

107107
function applyGeneratedReleaseNotes(content: string) {
108108
const editorContainer = document.querySelector<HTMLElement>('.combo-markdown-editor');
109-
const textarea = editorContainer?.querySelector<HTMLTextAreaElement>('textarea[name="content"]') ??
110-
document.querySelector<HTMLTextAreaElement>('textarea[name="content"]');
111109

112110
const comboEditor = getComboMarkdownEditor(editorContainer);
113-
if (comboEditor) {
114-
comboEditor.value(content);
115-
return;
116-
}
117-
118-
if (textarea) {
119-
textarea.value = content;
120-
textarea.dispatchEvent(new Event('input', {bubbles: true}));
121-
}
111+
comboEditor.value(content);
122112
}

0 commit comments

Comments
 (0)