With cursor changes on hover, Firefox touch simulation makes popups and panning wonky

338
3
06-12-2023 12:01 PM
MikeDolbow
New Contributor III

I've experienced some weird behavior in an app I'm upgrading and I've duplicated it in the following codepen (basically a modification of a very simple JSAPI sample):

https://codepen.io/Mike-Dolbow/pen/abQvOvm

"Instructions" are in the JS portion of the code pen. The problem boils down to this:

1) Adding a pointer-move event in order to change the cursor to a pointer when hovering over a graphic

2) Testing in Firefox, then using device emulation and touch simulation

3) now the popup on the graphic doesn't work, and oh boy does panning go bajonkers

Anyone else encounter anything like this? Yes, of course I don't need cursor changes in a touch device, but I anticipate this app being used in many types of devices. Other browsers seem fine.

0 Kudos
3 Replies
LaurenBoyd
Esri Contributor

Hi @MikeDolbow -

This is strange behavior. Is this only occurring on the device emulator with the touch simulation or are you able to reproduce this on physical devices in Firefox as well? I tested on an iPhone 13 Pro in Firefox with your CodePen and I am not able to reproduce the problem.

Lauren
0 Kudos
MikeDolbow
New Contributor III

I agree it's very strange! I've only tested it with the Firefox emulator. I just realized I have ONE physical device with a touch screen and a Firefox install, so I'm going to test it there. I'm glad to hear you couldn't reproduce, though! I'm thinking this is more a problem with the emulator than with the code.

0 Kudos
MikeDolbow
New Contributor III

Just tested on a Windows 10 laptop with a touch screen, using Firefox, and can't reproduce the behavior. Touches on the graphics reveal a popup and can pan as normal. Thanks for the idea to test on an actual device, I'm a lot less worried about this now!