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

Stop drag propagation, fixes #4249 #4306

Merged
merged 1 commit into from
Mar 7, 2016

Conversation

turban
Copy link
Contributor

@turban turban commented Mar 7, 2016

New pull request with one commit.

@turban turban mentioned this pull request Mar 7, 2016
mourner added a commit that referenced this pull request Mar 7, 2016
@mourner mourner merged commit 4333f88 into Leaflet:master Mar 7, 2016
@yohanboniface
Copy link
Member

Humm, this is the opposite of what have been done in #3682.
This will break Leaflet.Editable. I'll try to have a look with a bit of calm to make a counter-proposal OR fix on Leaflet.Editable side.

@mourner
Copy link
Member

mourner commented Mar 7, 2016

Damn. Maybe make stopPropagation optional, and enable it just for the map container?

@turban
Copy link
Contributor Author

turban commented Mar 7, 2016

Would it be possible to expose the original event so it can be stopped outside the API.

@yohanboniface
Copy link
Member

@turban, you should have it in e.originalEvent

@turban
Copy link
Contributor Author

turban commented Mar 7, 2016

@yohanboniface, I've not yet succeeded in doing that. Which event on the map should I listen to, to access the original event?

@yohanboniface
Copy link
Member

I'd say something like:

map.on('mousedown', function (e) {
    e.originalEvent.stopPropagation();
});

See http://playground-leaflet.rhcloud.com/keri/edit?html,console,output for a playground ;)

@turban
Copy link
Contributor Author

turban commented Mar 7, 2016

I was sure I tested that @yohanboniface, but on a second try this seems to work. I'm happy to withdraw my pull request @mourner.

@mourner
Copy link
Member

mourner commented Mar 7, 2016

Reverted.

@turban turban deleted the stop-drag-propagation branch March 7, 2016 21:28
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.

None yet

3 participants