I noticed when embedding compound report cards, the embed will not update if you change the compound ID in the URL in the same tab. Instead, it keeps showing the content from the first loaded page. This happens even when cookies, local storage, and session storage are cleared.
The issue persists in both normal and incognito modes, and when changing the URL directly in the address bar. However, it doesn't occur when loading the page in a new tab, suggesting that it's related to the state of the current tab.
Refreshing the tab with the new URL does correctly load the new page, indicating that the issue might be with how the embed handles hashchange events.
Expected result:
The page for CHEMBL4085457 should load.
Actual result:
The page for CHEMBL1743050 remains visible, despite the URL change.
This behavior also manifests when embedding the pages in an iframe and changing the src attribute. The workaround of fully removing and recreating the iframe when changing the src attribute does correctly load the new page.
I created some small example HTML files to showcase the issue.
examples.zip
I noticed when embedding compound report cards, the embed will not update if you change the compound ID in the URL in the same tab. Instead, it keeps showing the content from the first loaded page. This happens even when cookies, local storage, and session storage are cleared.
The issue persists in both normal and incognito modes, and when changing the URL directly in the address bar. However, it doesn't occur when loading the page in a new tab, suggesting that it's related to the state of the current tab.
Refreshing the tab with the new URL does correctly load the new page, indicating that the issue might be with how the embed handles hashchange events.
Steps to reproduce:
Expected result: The page for CHEMBL4085457 should load.
Actual result: The page for CHEMBL1743050 remains visible, despite the URL change.
This behavior also manifests when embedding the pages in an iframe and changing the src attribute. The workaround of fully removing and recreating the iframe when changing the src attribute does correctly load the new page.
I created some small example HTML files to showcase the issue. examples.zip
Thanks