Skip to content

Commit ac5775c

Browse files
committed
fix: resolve IconButton onClick handler issue preventing clicks
The IconButton component was conditionally setting the onClick handler based on the disabled state, which could prevent clicks from being handled properly when onClick was undefined. The button now always passes through the onClick handler and relies on the disabled attribute to prevent clicks when disabled. Fixes #7552
1 parent c7d7ad8 commit ac5775c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webview-ui/src/components/chat/IconButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const IconButton: React.FC<IconButtonProps> = ({
3939
className,
4040
)}
4141
disabled={disabled}
42-
onClick={!disabled ? onClick : undefined}
42+
onClick={onClick}
4343
style={{ fontSize: 16.5, ...style }}
4444
{...props}>
4545
<span className={cn("codicon", iconClass, isLoading && "codicon-modifier-spin")} />

0 commit comments

Comments
 (0)