This issue happens after click a link that opens up a jAlert box and then press ENTER key will open up another instance. It will keep creating an instance as you press ENTER key. The reason for this is because the focus on the link remains active, so if you press enter, its like you clicked the link again.
I made a fix, I hope I done it right but it works for me. I thought you might consider fixing this issue on your next release.
What did was to remove the focus on the active element:
At line 556, I added document.activeElement.blur(); //this is to prevent same link to trigger another instance.
/* If the alert has an element that should be focused by default */
if(alert.options.autofocus )
{
alert.instance.find(alert.options.autofocus).focus();
} else {
document.activeElement.blur(); //this is to prevent same link to trigger another instance
}
This issue happens after click a link that opens up a jAlert box and then press ENTER key will open up another instance. It will keep creating an instance as you press ENTER key. The reason for this is because the focus on the link remains active, so if you press enter, its like you clicked the link again.
I made a fix, I hope I done it right but it works for me. I thought you might consider fixing this issue on your next release.
What did was to remove the focus on the active element:
At line 556, I added document.activeElement.blur(); //this is to prevent same link to trigger another instance.
/* If the alert has an element that should be focused by default */