WebGui icon indicating copy to clipboard operation
WebGui copied to clipboard

Mobile web touches events not working correctly

Open Ober3550 opened this issue 4 years ago • 4 comments

Just wondering if you could do something about fixing the bugs with web touches on mobile. Since mobiles don't use the mouse click event as consistently compared to the touches event interface.

Ober3550 avatar Sep 20 '21 02:09 Ober3550

Does it still have the bugs now? I've updated to a newer version.

jnmaloney avatar Sep 20 '21 03:09 jnmaloney

It's much better now but the delay between the event and the gui changing is like 1 second. Perhaps this is because the gui is taking so much of the processing that the javascript events aren't being propagated properly?

Besides that I'm impressed how quickly this was 'mostly' fixed :D. Good Job!

Ober3550 avatar Sep 20 '21 03:09 Ober3550

Correction. The previous event is only processed after the current event is added. This means if you click on a menu then click somewhere else the menu you just clicked on is instantly unselected. I believe this is a quirk of how imgui works in general and I believe you should add an extra event after each touch event to push the touch event through the pipeline. Maybe after each touch event you can do another one at the same position

Ober3550 avatar Sep 20 '21 03:09 Ober3550

Actually no that sounds like a dumb idea for checkboxes and stuff... I think the solution would be to intercept all touch events and turn them into mouseclick events and do a bit of debouncing and stuff so there's not multiple events for the same position within a short span of time. You could change the update rate so you can drag through different colors on the color picker

Ober3550 avatar Sep 20 '21 04:09 Ober3550