Skip to content

Commit 8ec840b

Browse files
committed
removed unwanted handleKeyPress event
Signed-off-by: yash37158 <yash37158@gmail.com>
1 parent 1c18094 commit 8ec840b

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

  • src/sections/Projects/Sistent/identity/color

src/sections/Projects/Sistent/identity/color/code.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,6 @@ const CopyColor = ({ hex, token, copyValue }) => {
461461
}));
462462
}, []);
463463

464-
const handleKeyPress = useCallback((event) => {
465-
if (event.key === "Enter" || event.key === " ") {
466-
event.preventDefault();
467-
handleCopy();
468-
}
469-
}, [handleCopy]);
470464

471465
const getTooltipTitle = () => {
472466
if (copyState.isCopied) {
@@ -551,7 +545,6 @@ const CopyColor = ({ hex, token, copyValue }) => {
551545
onClick={handleCopy}
552546
onMouseEnter={handleMouseEnter}
553547
onMouseLeave={handleMouseLeave}
554-
onKeyPress={handleKeyPress}
555548
>
556549
<span>{getCopyValue()}</span>
557550
<Box

0 commit comments

Comments
 (0)