mapbox / mapbox/leaflet-image

Button events problem after using leaflet-image

Open
#136 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
380
Forks
140
PR merge metrics
No merged PRs in 30d

Description

Hello,

Im not completely sure if the problem is related to leaflet-image, but it happens only when i use it. Im using it for print the map so i put a new print button on screen that is not any leaflet control component or plugin or is inside default leaflet zones. Its an html button with a jquery event.
When click on that button it opens a dialog where you select page size and other options. If you open and close this dialog nothing happens, everything is fine. But if you open the dialog and do a print (that works very well) after closing the dialog you cannot open it again. Button event is not working anymore until you refresh the page.
So leaflet-image is hiding components like zoom buttons and other to do the printing, i would like to know if this could related to the problem and if i have to do something to re-enable the buttons.

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the leaflet-image print flow, focusing on the external HTML button and its jQuery dialog event lifecycle. Compare behavior after closing the dialog without printing and after completing a print; done means the button can reopen the dialog after printing without a page refresh.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.