Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web_src/js/features/repo-legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ async function onEditContent(event) {
const $content = $segment;
if (!$content.find('.dropzone-attachments').length) {
if (data.attachments !== '') {
$content[0].append(data.attachments);
$content[0].insertAdjacentHTML('beforeend', data.attachments);
Copy link
Member

@silverwind silverwind Mar 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous code had a .dropzone-attachments class, it it no longer needed to be created, @yardenshoham?

Copy link
Member

@yardenshoham yardenshoham Mar 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's immediately replaced...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see the previous code created and appended it, but then immediately replaced it with the HTML string, so likely it's okay.

}
} else if (data.attachments === '') {
$content.find('.dropzone-attachments').remove();
Expand Down