I'm programmimg a web application using knockout.js. There I'm trying to open a new tab on a button click. While it actually works fine on localhost, the popup blocker complains once I deploy the application. Is there any way to avoid the popup blocker considering these circumstances?
Button in the HTML-Code
<button data-bind="click:openNewTab"
type="button">
Open new tab
</button>
Piece of JavaScript-Code of the ViewModel which is used from the HTML file mentioned above
self.openNewTab = function ()
{
var newTabUrl = "https://www.stackoverflow.com";
window.open(newTabUrl, '_blank');
};