I am using an application who's features and code I do not control to create a number of reports. One of the things this is able to do is load and display a webpage. The webpage I am loading into this application has a number of links, and when I click on them from the application the links are blocked from opening because: "the request was made in a sandboxed frame whose 'allow-popups' permission is not set."
This makes sense from a security perspective to me, but I have noticed that if I right-click the link and click "Open in a new Tab" from the context menu that the link will be opened.
My initial attempt was to try to convert all left clicks on links to right clicks, but triggering right mouse up/down events followed by the context menu event did not show the default context menu. My second attempt was to use a custom context menu like here, but doing so required the window.open event being fired by my own js which was also sandboxed.
My question is what special sauce is the default right click behavior using and is there a clever way for me to emulate it or to trigger it via a left click?