fix(SessionItem): prevent event propagation when clicking delete

Stop click event propagation to avoid unintended parent component interactions when deleting a session
This commit is contained in:
icarus 2025-09-27 18:10:08 +08:00
parent bc0f283278
commit 4647688613

View File

@ -59,6 +59,7 @@ const SessionItem: FC<SessionItemProps> = ({ session, agentId, isDisabled, isLoa
isConfirmingDeletion ? 'hover:bg-danger-100' : 'hover:bg-foreground-300'
)}
onClick={(e: React.MouseEvent) => {
e.stopPropagation()
if (isConfirmingDeletion || e.ctrlKey || e.metaKey) {
onDelete()
} else {