Skip to content

pressing Enter key results in click event #5499

Closed
@egoroof

Description

How to reproduce

  • Leaflet version I'm using: 1.0.3
  • Browser (with version) I'm using: Chrome 60 (also firefox, safari and others)
  • OS/Platform (with version) I'm using: macOS Sierra 10.12.4 (also Windows 10 and Ubuntu)
  • go to http://leafletjs.com/examples/quick-start/example.html
  • open browser console
  • click to map
  • press Enter key

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

Press Enter key results in click event (you may catch it by adding click event listener on map). This behaviour causes issues in different modules. In the example clicking on geometry (circle or polygon) and press Enter key logs Cannot read property 'toString' of undefined, clicking in other point and press Enter key logs Cannot read property 'lat' of undefined.

I expect suppressing Enter key as click event so I wont need to check it in every module manually.

screen shot 2017-05-04 at 18 11 54 2

screen shot 2017-05-04 at 18 09 07 2

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions