What might cause links to be "unclickable"

otacke's picture
Forums: 

I think I found a bug in Agamotto that nobody has stumbled upon yet -- and I don't understand it right now.

If you add a link to a description, you can open it using the usual browser's "right click - open link" feature, but it won't open if you left-click it. At first I thought it might be related to inheriting various definitions of "user-select:none" for the div, but I deactivated this style using the browser's dev console and within the code, too. Nothing changed. Then I considered cross-site-scripting issues (http links not opening from within an iframe that's on a secured server) although this would be kind of weird. Didn't seem to be the problem, since linking to https sites doesn't work either.

Does anyone happen to be able to make an educated guess?

tomaj's picture

Hi Oliver,

My first intuision is that there is a click listener added, and e.preventDefault() stops it from working.

You can use the developer tools in Chrome, to see which click listeners are attached to a dom element like this:

- Tom

Attachments: 
otacke's picture

It was the other way round. I used an EventListener on the document to register when someone lets the slider thumb loose even when the mouse pointer was not over the slider. Stopping propagation on anchor tags within the description area fixed the problem. Thanks for leading me on the right track!

tomaj's picture

Glad to hear that you figured it out. I've hit on similar issues myself in the past.

- Tom

otacke's picture

Thanks! That's probably it!