Skip to content

Commit

Permalink
prevent highlighting in safari and switch to pointer events
Browse files Browse the repository at this point in the history
  • Loading branch information
HieronymusLex committed Dec 21, 2020
1 parent f5be63b commit bd880b1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"scripts": {
"build": "webpack --mode production"
},
"version": "0.1.2",
"version": "0.1.3",
"devDependencies": {
"@babel/cli": "^7.11.6",
"@babel/core": "^7.11.6",
Expand Down
9 changes: 9 additions & 0 deletions src/HandMatrix.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@
background-color: lightgrey;
}

.hand-matrix-cell div {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Old versions of Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none;
}

.hand-matrix-cell .pair {
background-color: #c0ffff;
}
Expand Down
6 changes: 3 additions & 3 deletions src/HandMatrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ const ComboRow = React.memo(
className="hand-matrix-cell"
style={{ flex: "1 1 0px" }}
onClick={() => onClick && onClick(combo)}
onMouseUp={() => onMouseUp && onMouseUp(combo)}
onMouseDown={() => onMouseDown && onMouseDown(combo)}
onMouseEnter={() => onMouseEnter && onMouseEnter(combo)}
onPointerUp={() => onMouseUp && onMouseUp(combo)}
onPointerDown={() => onMouseDown && onMouseDown(combo)}
onPointerEnter={() => onMouseEnter && onMouseEnter(combo)}
key={j}
>
<ComboTile
Expand Down

0 comments on commit bd880b1

Please sign in to comment.