What might cause links to be "unclickable"
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
Tue, 07/11/2017 - 07:53
Permalink
Maybe click listeners with e.preventDefault()
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
otacke
Tue, 07/11/2017 - 12:21
Permalink
It was the other way round. I
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
Wed, 07/12/2017 - 07:39
Permalink
No problem :)
Glad to hear that you figured it out. I've hit on similar issues myself in the past.
- Tom
otacke
Tue, 07/11/2017 - 08:13
Permalink
Thanks! That's probably it!
Thanks! That's probably it!