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

Add preventDefault() to avoid page scroll while panning #71

Merged
merged 1 commit into from
Oct 22, 2021

Conversation

gofr
Copy link
Contributor

@gofr gofr commented May 26, 2021

Enabling dragging of a map changes the touch-action CSS property
value to prevent the page from scrolling while you are dragging.

However, when dragging is enabled dynamically inside a touch event
this CSS change doesn't affect the current gesture.

Add e.preventDefault() in the event handler to prevent the page
from scrolling while you're performing a two-finger drag action
on the map.

This addresses issue #65

Enabling dragging of a map changes the touch-action CSS property
value to prevent the page from scrolling while you are dragging.

However, when dragging is enabled dynamically inside a touch event
this CSS change doesn't affect the current gesture.

Add e.preventDefault() in the event handler to prevent the page
from scrolling while you're performing a two-finger drag action
on the map.
@jcroucher
Copy link

Can we get this merged

@elmarquis elmarquis merged commit e4a393b into elmarquis:master Oct 22, 2021
@elmarquis
Copy link
Owner

Apologies. I've not been getting a lot of time to look after this plugin. But this fix appears simple and effective. Thank you for the investigation and resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants