I have a banner image in my app that when clicked will open an external link in a new tab. The code for it is below:
const openWindow = async url => {
try {
window.open(url, '_blank').focus();
} catch (err) {
console.error(err);
}
};
This successfully opens the link in a new tab the first time. However after clicking back to the new tab, if you try to click on the banner again, it does not open the link again unless you refresh the page (or navigate away and return). I tested this with the new tab still open and with closing it first, but in both cases the banner click will not open the new link. (I am using Firefox but the same behavior appears to happen in Chrome)