Skip to content

Update URL bar using history.pushState#2

Open
simonw wants to merge 1 commit into
mainfrom
history-push-state
Open

Update URL bar using history.pushState#2
simonw wants to merge 1 commit into
mainfrom
history-push-state

Conversation

@simonw

@simonw simonw commented Nov 20, 2023

Copy link
Copy Markdown
Contributor

This means users don't have to click the "Link to this search" button, as their search is automatically reflected in the URL bar as they navigate.

@simonw simonw added the enhancement New feature or request label Nov 20, 2023
@simonw

simonw commented Nov 20, 2023

Copy link
Copy Markdown
Contributor Author

This solution isn't complete though: the back/forward buttons don't yet work properly as the app would need to listen to the window.popstate event and update the search when that changes.

I think that's OK to implement separately though - not having to use "Link to this search" is still a worthwhile improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant