Skip to content

Right click triggers draw:drawvertex event #1060

@hari0603

Description

@hari0603
  • I'm reporting a bug, not asking for help
  • I've looked at the documentation to make sure the behaviour is documented and expected
  • I'm sure this is a Leaflet Draw code issue, not an issue with my own code or the framework I'm using (Cordova, Ionic, Angular, React…)
  • I've searched through the issues to make sure it's not yet reported

How to reproduce

  • Leaflet version I'm using: 1.6.0
  • Leaflet Draw version I'm using: 1.0.4
  • Browser (with version) I'm using: Chrome (108.0.5359.124)
  • OS/Platform (with version) I'm using: Ubuntu 20.04

Steps to reproduce

  • Setup polygon handler using L.Draw.Polygon
  • Enable polygon handler
  • Right-click on the map and confirm that new vertices are getting added.
  • This issue is also present in the

What behaviour I'm expecting and which behaviour I'm seeing

  • Only left-click events should add new vertices.

Minimal example reproducing the issue

This issue is present in Leaflet 1.0+ Demo as well.

Additional information

Big fan of the Leaflet community! I wanted to know if this behaviour was decided by design. If not, I would love to contribute by raising a PR to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions