baetheus / bee

A try at cloning the New York Times Spelling Bee
Mozilla Public License 2.0
16 stars 6 forks source link

Prevent text highlighting when double-clicking in game #40

Closed JohnHKoh closed 2 years ago

JohnHKoh commented 2 years ago

Double-clicking letters, which can happen when trying to enter the same letter twice in succession, can highlight text below the game, which could have unintended consequences.

image

Setting user-select to none solves this issue. I see this project uses a CSS library, but I could not find any related to user-select. This PR was just made as a proof-of-concept that this fix can be made. Feel free to close this PR to use the custom CSS library.

baetheus commented 2 years ago

There isn't a user-select class in the css library so this can be pulled in as is.