I am using the dashboard web component to add HTML code. I have created a link to Skyline website as follows:
<a href="https://www.skyline.be/" target="_blank">Skyline Communications homepage</a>
I am using target="_blank" because I want a new tab to open when the user clicks the link. Instead, what is happening is that dashboard is trying to load the website inside the component and it fails.
How can I open the url in a new tab? Why is it failing to navigate to the the website (error: refused to connect)?
After clicking the link.
The reason why it won't open in a new tab is because the custom html code is, for security reasons, sandboxed and has no access to the application code and functionality.
The reason why you see the error is because skyline.be does not allow being displayed inside iframes from other domains. The X-Frame-Options is set to sameorigin.
With the low-code apps you could create a button to open a url in a new tab, but in dashboards this is not possible.
It runs indeed within a sandbox, although we can probably consider to allow the sandbox opening popups/tabs.
Just for clarity, this is to protect against clickjacking attacks: https://portswigger.net/web-security/clickjacking