question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Click on popup text, event not catchable

See original GitHub issue

I can do something wrong but. I’ve tried to create a click event listener on text (span tag) placed in PopUp and unable to catch click event in any browser, sometimes it does works, but most of the time it’s not. If I change span to a tag it can start to work but for one popup first in list, and doesn’t work for the rest. It’s only me having this issue?

It’s easy to open popup from my list of popup, but to open this list of popups from map (popup) is not possible currently.

Here is my code to open popup it works:

    $('.pointpopup').click(function(){
        var pointname = this.id;
        map.setView(point[pointname].getLatLng(),15);
        point[pointname].openPopup();
    });

Here is code to open list from popup, does not work, (test code to fire event):

    $('.map_popup').click(function(){
        //alert('Try to open Accordion ')
        console.log('Try to open Accordion' + $(this).attr('href'));
    })

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:42 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
seasoupcommented, Apr 24, 2013

I’m using the jquery UI autocomplete instead. Works like a charm

Josh Powell

On Apr 23, 2013, at 5:06 PM, Travis Webb notifications@github.com wrote:

Can we solve this?

— Reply to this email directly or view it on GitHub.

1reaction
mournercommented, Jun 29, 2012

Yep, Leaflet stops click propagation on popup outmost DOM element, but you can put the click on one of the inner elements, e.g. .leaflet-popup-content-wrapper (inspect it in the dev tools to see).

Read more comments on GitHub >

github_iconTop Results From Across the Web

button click event not working in a pop up - Stack Overflow
I have to enter the name of the new db in the text box and save it in my database. How can I...
Read more >
COVID-19 Testing: What You Need to Know - CDC
Learn about testing for COVID-19, including the types of tests, who should get tested, how to get tested, and print resources in English...
Read more >
Render setup failed vivecraft - - Convittiadi Campobasso
Jan 21, 2022 · You just need to right-click the headset icon in SteamVR and ... screen with the text: "Render Setup failed:Unknown...
Read more >
How to Create Popup on Click Event - Video Tutorial - MailerLite
The easy and quick way how to make a popup when someone clicks on a link, a photo, or a button. Learn how...
Read more >
Recover deleted messages on discord - bpm kids
There is a navigation window pop-up, allowing you to select Message Logger. From the home screen, click the Recover from iOS Device option....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found