Skip to content

overly sensitive drag event #872

@jeroen

Description

@jeroen

I have some geojson polygons on top of my leaflet map, which have onclick handler attached to them to select or unselect the area. Things work fine, however some users have complained that the clicking sometimes does not work.

What turns out to be the problem is that the drag event is overly sensitive. If the user has even the tiniest mouse movement while clicking (which often happens when you're rapidly mousing and clicking through the screen) the event will turn into a drag event instead of a click event.

Maybe you should consider setting or increasing the minimum mouse movement distance that is needed before a click actually turns into a drag event. I'm quite sure this is the case for other similar applications. E.g. try click&dragging the New Issue button on the top of this screen. It won't turn until a drag after a centimeter or so.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions