Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compound Report Card embeds don't update with hashchange events #1317

Open
justin-john-sinequa opened this issue May 15, 2023 · 0 comments
Open

Comments

@justin-john-sinequa
Copy link

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:

  1. Open a browser tab and navigate to https://www.ebi.ac.uk/chembl/embed/#compound_report_card/CHEMBL1743050/name_and_classification.
  2. Once the page loads, change the URL in the address bar to https://www.ebi.ac.uk/chembl/embed/#compound_report_card/CHEMBL4085457/name_and_classification and hit enter.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant