Skip to content

Popup should not go offscreen on resize #1052

@lapo-luchini

Description

@lapo-luchini

When screen is resized (it happens often to me because I have a popup with a text field and android opening the keyboard resizes the full-screen-map) the center of the map is used as pivot, but if there is a popup on screen it would be nice to keep the popup visible (just like the popup does when it opens up in the first time).

I tried doing that with commit lapo-luchini/Leaflet@6940786 but that doesn't really work if the popup doesn't fit on screen (his own panBy generates a new moveend and it keeps bouncing left and right if wider than the screen). Proper fix would probably need firing viewreset after a resize, but I didn't find a nice way to do that (should be done on animation end, but that's managed elsewhere and it's not easy to modify).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions