Popup on click does not do preventDefault on links

When Popup is triggered by the click on link, there is preventDefault missing and links still redirects to new page or jumps to top of the page when # is used in the href.

So it's not possible to use existing links as Popup triggers.

  • Adam Czajczyk

    Hello Kevin,

    I hope you're well today and thank you for reporting this.

    I'd appreciate some additional explanation though because I got a feeling that I'm missing something important here.

    What I mean is that usually there's no point in using links ("a" elements) if that link is not supposed to work. If I understand that correctly what should happen after clicking on a link, should be that the popup opens and nothing else happens then.

    In that case, instead of using "a" tag you can use any other HTML tag. If you need to change the way it looks or even change the cursor/pointer shape so it "looked like" a link, that can be done using CSS.

    Also, if there's "a" tag used with # anchor and that's causing the site to "jump to the top" while it shouldn't, removing the "href=#" part should help. In that case though, again - "a" tag could/should be simply replaced with a different one.

    PopUp is not supposed to prevent any action from happening, the only thing it should do would be to open the popup when you click on a specific element.

    Having that said, I could really use some additional explanation. That would help us to understand the case and find a solution (as the issue is already reported to the developers).

    Kind regards,
    Adam