Skip to content

Instantly share code, notes, and snippets.

@joeldbirch
Created March 29, 2013 03:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joeldbirch/5268562 to your computer and use it in GitHub Desktop.
Save joeldbirch/5268562 to your computer and use it in GitHub Desktop.
Seems to be the only way to reset Apple's hacky iOS "hover" state after back button click. Uses jQuery event attachment, but can be easily swapped for addEventListener.
if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
$(window).on('pageshow', function(e) {
if (e.originalEvent.persisted) {
window.location.reload();
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment