Skip to content

Commit

Permalink
Remove keydown funcion
Browse files Browse the repository at this point in the history
  • Loading branch information
sushmi21 committed Aug 23, 2024
1 parent f248d8b commit d9118ee
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/common/ActionButtons/ActionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,6 @@ const ActionButton: FC<ActionButtonProps> = props => {
props.action?.(button.payload, null, { label: button.title });
};

const handleKeyDown = (event: React.KeyboardEvent) => {
if (isURLComponent && event.key === "Enter") {
onClick(event as any);
}
if (!isURLComponent && (event.key === "Enter" || event.key === " ")) {
onClick(event as any);
}
};

const renderIcon = () => {
if (customIcon) return customIcon;
if (isWebURL && showUrlIcon) return <LinkIcon />;
Expand All @@ -141,7 +132,6 @@ const ActionButton: FC<ActionButtonProps> = props => {
return (
<Component
onClick={onClick}
onKeyDown={handleKeyDown}
className={classnames(
classes.button,
isWebURL && classes.url,
Expand Down

0 comments on commit d9118ee

Please sign in to comment.