hi all, I have a messenger type user interface whose html code looks like below
DDD <a class=“xxx”; (click)=‘openModal()’>YYY.
my openModal() function looks as below
var test=this;
var modal=this.modal;
var x = document.getElementsByClassName("xxx");
addEventListener('click', function(e){
if ((<HTMLInputElement>event.target).tagName!=undefined && (<HTMLInputElement>event.target).tagName == 'A') {
var image = (<HTMLInputElement>event.target).getAttribute('class');
if(image.split(" ")[0]=="yyy")
{
const myModalPage = modal.create("yyy");
myModalPage.present();
}
else{
const myModalPage = modal.create("xxx");
myModalPage.present();
}
}
}, false);
console.log("binding the event")
this works fine on browsers and android phones, but does not work in iPhones, what’s the problem ?