I ave created a forge app which uses react to display issues in a table and i have added links to certain fields but when trying to open them using right click it gives an error
Blocked opening 'https://forge-learning1.atlassian.net/browse/FL-103' in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set.
The error you're encountering happens because Forge apps run in a sandboxed iframe environment, which has strict security settings. By default, the iframe sandbox prevents popups unless the allow-popups
attribute is explicitly set, which isn't allowed in Forge apps for security reasons.
To solve this, instead of opening links directly with standard HTML anchor tags, you can use the Forge Bridge API's router.navigate
function. This function allows you to programmatically navigate within the Atlassian product without violating the sandbox's restrictions.
Here’s the link to the documentation for router.navigate
:
Forge Bridge Router API
Example usage:
import { router } from '@forge/bridge';
const handleLinkClick = (issueKey) => {
router.navigate(`/browse/${issueKey}`);
};
I would highly recommend checking out the Atlassian Developer Community for more in-depth discussions and support on Forge app development. You can post questions or browse existing solutions there: Atlassian Developer Community
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.