diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/CaseItemDetails/CaseItemDetails.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/CaseItemDetails/CaseItemDetails.xhtml index 37832499367..30fdc8ae336 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/CaseItemDetails/CaseItemDetails.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/CaseItemDetails/CaseItemDetails.xhtml @@ -229,6 +229,14 @@ iframes.remove(); } if (window.history.length > 2) { + // handle for bug https://1ivy.atlassian.net/browse/IVYPORTAL-17122 + // when user open case detail from dashboard or full case list -> related task -> start task in iFrame -> cancel + // if url of current document is openning task in iFrame + if (document.referrer.includes('TaskTemplateIFrame.xhtml?taskUrl=')){ + // back to case list to avoid go error: click back will navigate to openning task + backToCasesList(); + return; + } window.history.back(); } else { // if no history or back from a page in Frame