Skip to content

Commit

Permalink
[fix] user-select not none
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackiexiao committed Jan 6, 2024
1 parent 6cbb258 commit feb603b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions client/components/game/CustomMapTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ export default React.memo(function CustomMapTile(props: CustomMapTileProps) {
userSelect: 'none',
WebkitUserSelect: 'none',
}}
ref={(node) => {
if (node) {
node.style.setProperty("user-select", "none", "important");
}
}}
>
{unitsCount}
</div>
Expand Down
7 changes: 5 additions & 2 deletions client/components/game/MapTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,11 @@ export default React.memo(function MapTile(props: MapTileProps) {
textOverflow: 'ellipsis',
overflow: 'visible',
textShadow: '0 0 2px #000',
userSelect: 'none',
WebkitUserSelect: 'none',
}}
ref={(node) => {
if (node) {
node.style.setProperty("user-select", "none", "important");
}
}}
>
{/* 50% */}
Expand Down

0 comments on commit feb603b

Please sign in to comment.