Skip to content

Wrong Calculation of ContainerPoint in Fancybox #1322

@mfelsche

Description

@mfelsche

Reproduce: Open a Leaflet map inside a Fancybox (http://fancyapps.com/fancybox/) when the browser is scrolled down (window.scrollY > 0). Doubleclick on a position in the map, the map will zoom to another point window.scrollY pixels far down south than the position just clicked.

Think this issue is somewhere around l.1723ff in dist/leaflet-src.js:

mouseEventToContainerPoint: function (e) { // (MouseEvent)
    return L.DomEvent.getMousePosition(e, this._container);
},

A Minimum-example will be attached: https://gist.github.com/4664568

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