diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js b/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js index e966d38ab6cf..cac01ca0b238 100644 --- a/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js +++ b/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js @@ -14,6 +14,7 @@ import styles from '../../../styles/styles'; import Navigation from '../../../libs/Navigation/Navigation'; import AnchorForCommentsOnly from '../../AnchorForCommentsOnly'; import AnchorForAttachmentsOnly from '../../AnchorForAttachmentsOnly'; +import * as Report from '../../../libs/actions/Report'; import * as Url from '../../../libs/Url'; import ROUTES from '../../../ROUTES'; @@ -47,6 +48,11 @@ const AnchorRenderer = (props) => { // If we are handling a New Expensify link then we will assume this should be opened by the app internally. This ensures that the links are opened internally via react-navigation // instead of in a new tab or with a page refresh (which is the default behavior of an anchor tag) if (internalNewExpensifyPath) { + if (attrPath.indexOf('r/') === 0) { + const reportID = attrPath.split('/')[1]; + Report.openReport(reportID); + } + Navigation.navigate(internalNewExpensifyPath); return; } diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js index d0de441dd08f..5ef7531cbcf7 100644 --- a/src/pages/home/ReportScreen.js +++ b/src/pages/home/ReportScreen.js @@ -221,7 +221,7 @@ class ReportScreen extends React.Component { )} >