fix mobile click with preventDefault and pointer-events CSS

This commit is contained in:
vndangkhoa 2026-04-29 15:46:58 +07:00
parent 0817d6a367
commit 3bc0b43b10
2 changed files with 7 additions and 1 deletions

View file

@ -24,7 +24,8 @@ function TetrisPiece({ piece, isDark }) {
setShowText(false);
};
const handleClick = () => {
const handleClick = (e) => {
e.preventDefault();
if (piece.link) {
window.open(piece.link, '_blank', 'noopener,noreferrer');
}

View file

@ -29,6 +29,11 @@
-webkit-tap-highlight-color: transparent;
}
.tetris-board > div {
touch-action: manipulation;
-webkit-tap-highlight-color: transparent;
}
html, body {
width: 100%;
overflow-x: hidden;