Hi guys,
I have very specific probleme on which I need help.
So I have to display server side generated html on which i have no power.
This html sometimes contains <a tags with hrefs.
I’m using a trick i’ve seen around here where I capture the click event on the text and check if the element is a
tapOnText(e) {
if (e.target) {
let element = e.target || e.srcElement;
if (element.tagName == ‘A’ ) {
this.utils.openExternalLink(element.href);
return false;
}
}
}
and then i follow the normal process of opening something with inAppBrowser.
But here is the twist. For some reasons my links sometimes are part of text blocks that are contained within tags.
In such occasion, the span fire the event that get my tapOnText function, is not recognized as an <a and my link won’t open.
Any idea how i could fix that?