Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panning can result in zooming on touchscreens #6745

Closed
quincylvania opened this issue Aug 11, 2019 · 11 comments
Closed

Panning can result in zooming on touchscreens #6745

quincylvania opened this issue Aug 11, 2019 · 11 comments
Assignees
Labels
bug A bug - let's fix this! touch-stylus An issue with touchscreen or pen input
Milestone

Comments

@quincylvania
Copy link
Collaborator

When using iD on iOS, I can often enter a state where simply swiping to pan ends up zooming the screen. This state makes navigating significantly harder and I have not found a way to get out of it.

@quincylvania quincylvania added bug A bug - let's fix this! touch-stylus An issue with touchscreen or pen input labels Aug 11, 2019
@BjornRasmussen
Copy link
Contributor

BjornRasmussen commented Aug 11, 2019

Same for me with Chrome on Android! The "Solution" is reloading.

@quincylvania quincylvania added this to the 2.18.0 milestone May 8, 2020
@quincylvania quincylvania self-assigned this May 8, 2020
@quincylvania
Copy link
Collaborator Author

I've been looking into this while revamping touch interaction for #5505. I'm pretty sure the issue is that a touch leaves the screen without iD logging it as gone, so subsequent swipes are interpreted as two-finger pinches instead of one-finger pans. This commit likely fixed it by listening for all ended or canceled touches at the window level instead of the map level, but I couldn't reproduce the problem reliably so I'm not certain. We'll have to do extensive test mapping on the preview site on touch devices to suss out touch interaction bugs before releasing.

@quincylvania
Copy link
Collaborator Author

This is still happening…

I think we need to be more careful about using stopPropagation on pointerup events since stuck pointers can occur if the map zoom/pan handler doesn't receive this event.

@quincylvania
Copy link
Collaborator Author

I haven't seen this bug in quite some time, so I'm hoping I finally fixed all occurrences. We must continue to stay vigilant… 🕵️‍♂️🐛

@BjornRasmussen
Copy link
Contributor

As of 5 minutes ago on the preview site, this is still an issue. I got stuck and couldn't escape. I am using Firefox, windows 10.

@quincylvania
Copy link
Collaborator Author

@BjornRasmussen Any chance you have steps to reproduce this?

@BjornRasmussen
Copy link
Contributor

No, unfortunately not. It just happened to me the first time I tested out the new iD

@cloudrac3r
Copy link

This is unfortunately still an issue. (Please re-open this!) I've never touched the iD editor source code before, so I'd be interested to know, is there a way I can open some sort of debug view, or inspect the touch state, so that I can see whether iD thinks that a touch is stuck?

From how it feels to use the editor while in the touch state, I think it is behaving like a previous touch was stuck, but without a way to see iD's interpretation of the touch state, I don't expect I would be able to figure out the steps to reproduce.

I am familiar with general web development and I'd like to do whatever I can to help fix this.

@cloudrac3r
Copy link

I have discovered that it seems to happen while drawing areas if something goes wrong drawing the area (like the area crossing over itself), however, I still can't consistently trigger it.

I can always remove the stuck touch event by reloading the page, and I think also by saving the current working changeset. It seems like I can sometimes (always?) remove the stuck touch event by also pressing M to activate the move tool, picking up an area, and putting it down again. I will keep posting if I figure out anything else.

I'm using my finger here to touch. Using a digital stylus to touch the screen seems to produce other inconsistencies, so I'm not opening that can of worms yet.

@cloudrac3r
Copy link

I can remove the stuck touch event by pressing M while an area is selected to activate the move tool, and then clicking the mouse button (without moving it) to complete a useless move. However, if I use the Enter or Esc keyboard keys to end the move operation, it does not undo the stuck touch event.

I should mention that I've been using a touchscreen laptop running Firefox on KDE Linux.

@1ec5
Copy link
Collaborator

1ec5 commented Dec 28, 2021

You may be seeing something similar to #8649. Please open a new issue, since gesture handling changed significantly since this issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug - let's fix this! touch-stylus An issue with touchscreen or pen input
Projects
None yet
Development

No branches or pull requests

4 participants