Skip to content

Request a redraw when the url change through the popstate event listener#7403

Merged
lucasmerlin merged 1 commit intoemilk:mainfrom
irevoire:fire-back-event
Aug 5, 2025
Merged

Request a redraw when the url change through the popstate event listener#7403
lucasmerlin merged 1 commit intoemilk:mainfrom
irevoire:fire-back-event

Conversation

@irevoire
Copy link
Copy Markdown
Contributor

@irevoire irevoire commented Aug 1, 2025

Hey, I added an event listener on the popstate event. That fixed my issue

Screen.Recording.2025-08-01.at.13.02.42.mov

@irevoire irevoire marked this pull request as ready for review August 1, 2025 11:04
@lucasmerlin lucasmerlin added this to the 0.33.0 milestone Aug 5, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 5, 2025

Preview available at https://egui-pr-preview.github.io/pr/7403-fire-back-event
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@lucasmerlin lucasmerlin added feature New feature or request web Related to running Egui on the web eframe Relates to epi and eframe labels Aug 5, 2025
@lucasmerlin lucasmerlin modified the milestones: 0.33.0, 0.32.1 Aug 5, 2025
@lucasmerlin lucasmerlin merged commit 7fb13d8 into emilk:main Aug 5, 2025
28 of 29 checks passed
emilk pushed a commit that referenced this pull request Aug 15, 2025
…tener (#7403)

<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/main/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

Hey, I added an event listener on the [`popstate`
event](https://developer.mozilla.org/en-US/docs/Web/API/Window/popstate_event).
That fixed my issue


https://github.com/user-attachments/assets/a621dac9-b7c3-426a-968b-dc73c5702eea

* Closes #7402
* [x] I have followed the instructions in the PR template
Masterchef365 pushed a commit to Masterchef365/egui that referenced this pull request Apr 3, 2026
…tener (emilk#7403)

<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/main/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

Hey, I added an event listener on the [`popstate`
event](https://developer.mozilla.org/en-US/docs/Web/API/Window/popstate_event).
That fixed my issue


https://github.com/user-attachments/assets/a621dac9-b7c3-426a-968b-dc73c5702eea

* Closes emilk#7402
* [x] I have followed the instructions in the PR template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eframe Relates to epi and eframe feature New feature or request web Related to running Egui on the web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fire a redraw when the back button is pressed

2 participants