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

Fix page navigation in iframe #128

Merged
merged 1 commit into from
Aug 17, 2024
Merged

Fix page navigation in iframe #128

merged 1 commit into from
Aug 17, 2024

Conversation

MAX-786
Copy link
Member

@MAX-786 MAX-786 commented Aug 16, 2024

fixes #124

after looking into this it seems that if we prefix iframe url like i typedin https://localhost:5173/#! and then when you navigate to another page in adminUI, then adminUI changes it to https://localhost:5173/new-path?token=xyz#! and so it works locally but it will not work current netlify so, even if i let adminUI do this https://localhost:5173/#!/new-path this just opens up the root route of the site as you can see here this will open up homepage instead of test page : https://hydra-vue-f7.netlify.app/#!/test

So current navigation in iframe works like this: after navigating to another page in iframe,

  • hydrajs detects any changes in href of the window i.e. it checks if pathname is changed or not and also if hash is changed or not.
  • then sends the new path to adminUI and adminUI routes to this path (but doesn't change the iframe src which saves us from the extra reloads.

@MAX-786 MAX-786 marked this pull request as ready for review August 17, 2024 01:54
@djay
Copy link
Member

djay commented Aug 17, 2024

fixes #124

@djay djay merged commit 5e006a9 into main Aug 17, 2024
1 check passed
@djay djay deleted the fix-url-nav branch August 17, 2024 03:40
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

Successfully merging this pull request may close these issues.

should handle hash bang style urls
2 participants