fix mobile click with preventDefault and pointer-events CSS
This commit is contained in:
parent
0817d6a367
commit
3bc0b43b10
2 changed files with 7 additions and 1 deletions
|
|
@ -24,7 +24,8 @@ function TetrisPiece({ piece, isDark }) {
|
||||||
setShowText(false);
|
setShowText(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleClick = () => {
|
const handleClick = (e) => {
|
||||||
|
e.preventDefault();
|
||||||
if (piece.link) {
|
if (piece.link) {
|
||||||
window.open(piece.link, '_blank', 'noopener,noreferrer');
|
window.open(piece.link, '_blank', 'noopener,noreferrer');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,11 @@
|
||||||
-webkit-tap-highlight-color: transparent;
|
-webkit-tap-highlight-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tetris-board > div {
|
||||||
|
touch-action: manipulation;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue