# How to Resolve an Issue Where Video/Image is not getting open in the new tab in SharePoint page?

**URL:** <https://techcommunity.softwareag.com/t/how-to-resolve-an-issue-where-video-image-is-not-getting-open-in-the-new-tab-in-sharepoint-page/267374>\
**Category:** Knowledge base\
**Tags:** microsoft, UI, sharepoint, SPFX, ReactJS, Custom-Webparts, UI-Development\
**Created:** [December 15, 2022, 9:43am UTC](https://techcommunity.softwareag.com/t/how-to-resolve-an-issue-where-video-image-is-not-getting-open-in-the-new-tab-in-sharepoint-page/267374 "2022-12-15T09:43:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vivek.Chadha](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@Vivek.Chadha](https://techcommunity.softwareag.com/u/Vivek.Chadha)\
**Post date:** [December 15, 2022, 9:43am UTC](https://techcommunity.softwareag.com/t/how-to-resolve-an-issue-where-video-image-is-not-getting-open-in-the-new-tab-in-sharepoint-page/267374/1 "2022-12-15T09:43:52Z")

</div>

## Problem Statement

Video Or Image is not getting opened in the new window even with using target=“\_blank” property in the Anchor "\<a “\>” or any other HTML tag in Sharepoint custom web parts?

## Root Cause

Navigation to the page is achieved via a page router to avoid full refresh of the screen, When you develop custom SPFx solutions the behavior of smart navigation might not be desirable, especially for scenarios using the `target` attribute to open a page in a separate tab in the browser.

## Issue Resolution

In the below example, the `target` attribute will be ignored and the page opens in the same tab via page router logic. In order to override the page router for hyperlinks add the `data-interception` attribute to the link with a value of `off` .

Give data-interception=”off” property to the tag. Below is the sample code for the same.

`<a className={styles.openInNewTab} onClick={()=>updateViews()} href={cardData.url} target="_blank" data-interception="off"><Icon iconName='OpenInNewTab'/></a>`

This will help you to open any video or image in the new window.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [June 13, 2023, 9:44am UTC](https://techcommunity.softwareag.com/t/how-to-resolve-an-issue-where-video-image-is-not-getting-open-in-the-new-tab-in-sharepoint-page/267374/2 "2023-06-13T09:44:00Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
