mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(platform): fix image delete button on EditAgentForm (#12362)
### Summary - SECRT-2094: Fix store image delete button accidentally submitting the edit form — the remove image <button> in ThumbnailImages.tsx was missing type="button", causing it to act as a form submit inside the EditAgentForm. This closed the modal and showed a success toast without the user clicking "Update submission". https://github.com/user-attachments/assets/86cbdd7d-90b1-473c-9709-e75e956dea6b ### Changes - `frontend/.../ThumbnailImages.tsx` — added type="button" to image remove button
This commit is contained in:
@@ -108,6 +108,7 @@ export function ThumbnailImages({
|
||||
className="relative flex-shrink-0 overflow-visible"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => handleRemoveImage(index)}
|
||||
className="absolute -right-2 -top-2 z-50 inline-flex size-6 items-center justify-center rounded-full bg-slate-900"
|
||||
aria-label="Remove image"
|
||||
|
||||
Reference in New Issue
Block a user