0

I created a React game and it works great, but I found a lot of problems on Samsung tablet with Samsung web browser and keyboard attached. My game is designed to work on both touch screens and with mouse.

When I'm using this Samsung setup and I point an element with touchpad, the onPointerEnter event runs first as touch and then as mouse too, which makes it super unstable. Other pointer events are messed up too. On iPads with keyboard on the other hand, only mouse pointer event is being fired when using touchpad, which is understandable behavior.

Simple test:

<button onPointerEnter={console.log}>
    I'm a button
</button>

Is this a known problem and if so, what are the recommended steps to make it work correctly? I can't just block mouse events, because my game uses mouse too.

6
  • It sounds like the keyboard touchpad is being treated as a touch screen by the device. Commented Mar 22, 2023 at 20:01
  • Well, if you are convinced of that fact, then either you need to decide to prevent touch screen devices, or work around the issue (eat the events). Commented Mar 22, 2023 at 20:06
  • maybe with the keyboard, the browser is trying to simulate mouse events too. Could only find old jquery fix: github.com/jquery-archive/PEP/pull/25 Commented Mar 22, 2023 at 20:10
  • @Sysix thanks, but the problem is that in this case, mouse events are the "correct" ones so I should rather ignore the touch ones under some circumstances. Commented Mar 22, 2023 at 20:19
  • is this bug also in chrome and firefox? when not, maybe create an ticket on samsung browser issue-tracker Commented Mar 22, 2023 at 21:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.