Skip to content

Conversation

Rich-Harris
Copy link
Member

This updates the playground URL hash on mouseleave, which means that if you move the mouse out of the editor to select the URL bar, the hash is updated before you select it which feels a bit nicer.

It also uses the short-lived sessionStorage trick suggested in #507 (comment) to save stuff immediately before a reload. (I also tried intercepting the keypresses that would lead to a reload and preventing the default, but a) it felt a bit naughty and b) it wouldn't work on mobile.)

@Rich-Harris
Copy link
Member Author

will go ahead and merge because not having titles kept is annoying and this PR fixes it

@Rich-Harris Rich-Harris merged commit f62a337 into main Oct 25, 2024
4 checks passed
@Rich-Harris Rich-Harris deleted the update-hash-before-reload branch October 25, 2024 14:03
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.

1 participant