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

Stopped click events propagating to map #178

Merged
merged 3 commits into from
Mar 4, 2020

Conversation

alex-Hudson
Copy link
Contributor

@alex-Hudson alex-Hudson commented Jan 30, 2020

Fixes #176

In open layers a simulated click is created on pointerdown event. We dont want this to propagate to the map, so need to stop default when the context menu is clicked

@alex-Hudson
Copy link
Contributor Author

alex-Hudson commented Mar 4, 2020

Fixes issue #179

@jonataswalker jonataswalker merged commit c240c67 into jonataswalker:master Mar 4, 2020
@jonataswalker
Copy link
Owner

Thanks @alex-Hudson

@@ -208,11 +208,14 @@ export class Internal {

//one-time fire
evt.target.addEventListener(
'click',
'pointerdown',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alex-Hudson & @jonataswalker should this be on click intead of pointerdown?

Had an issue after upgrading to the newest version of ol-contextmenu & ol 7, where contextmenu stopped working on touch devices (didn't register taps but instead closed right away at pointerdown)

Changing this eventlistener back to "click" in a local copy solved it for me

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.

Context menu allows a click on a menu option to propagate to the map
3 participants