eternagame / eterna-mobile

Eterna mobile app
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Hide selection pop-up and highlighting on Game views #83

Closed tkaragianes closed 2 years ago

tkaragianes commented 2 years ago

Closes eternagame/EternaJS#617. When a user taps and holds in the game interface, it triggers the native copy selection behavior, which includes highlighting the entire interface. user-select: none on the iframe displaying the game should prevent this behavior.

luxaritas commented 2 years ago

No dice. After some testing, it looks like: 1) This is an EternaJS issue. I swear I had handled it there, but evidently not 2) Even though Safari is supposed to support un-prefixed user-select, it needs the -webkit- prefix, so we'll need to do something like this on the HTML tag:

-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
luxaritas commented 2 years ago

Actually, it can go on the canvas itself - that's specifically what's getting selected here

luxaritas commented 2 years ago

Also also, I read the caniuse page wrong - it does require it being prefixed, so that explains that.