@@ -189,7 +189,16 @@ export function ManagerList({ credentials }: ManagerListProps) {
189189 setSoftwareModalOpen ( true )
190190 }
191191
192- const handleCardClick = async ( instance : EC2Instance ) => {
192+ const handleCardClick = async ( instance : EC2Instance , event ?: React . MouseEvent ) => {
193+ // Don't handle card clicks if the click came from a button or interactive element
194+ if ( event ) {
195+ const target = event . target as HTMLElement
196+ // Check if click came from a button, or any element inside a button
197+ if ( target . closest ( 'button' ) ) {
198+ return
199+ }
200+ }
201+
193202 // Check if Dokploy is already installed
194203 if ( hasDokploy ( instance ) ) {
195204 toast ( {
@@ -599,7 +608,7 @@ export function ManagerList({ credentials }: ManagerListProps) {
599608 < Card
600609 key = { instance . instanceId }
601610 className = "overflow-hidden cursor-pointer hover:border-primary/50 transition-colors"
602- onClick = { ( ) => handleCardClick ( instance ) }
611+ onClick = { ( e ) => handleCardClick ( instance , e ) }
603612 >
604613 < CardHeader className = "pb-3" >
605614 < div className = "flex items-start justify-between" >
@@ -771,7 +780,7 @@ export function ManagerList({ credentials }: ManagerListProps) {
771780 className = "w-full bg-green-600 hover:bg-green-700"
772781 onClick = { ( e ) => {
773782 e . stopPropagation ( )
774- handleCardClick ( instance )
783+ handleCardClick ( instance , e )
775784 } }
776785 disabled = { isLoading || ! ! installationState }
777786 >
0 commit comments