Skip to content

Commit

Permalink
ARROW-15895: [R] R docs version switcher disappears & reappears with …
Browse files Browse the repository at this point in the history
…back button on Chrome

Closes #12846 from thisisnic/ARROW-15895_version_switcher

Authored-by: Nic Crane <thisisnic@gmail.com>
Signed-off-by: Nic Crane <thisisnic@gmail.com>
  • Loading branch information
thisisnic committed Apr 12, 2022
1 parent 8f5936f commit ab55bba
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions r/pkgdown/extra.js
Expand Up @@ -33,6 +33,16 @@ function check_page_exists_and_redirect(event) {
return false;
}

/**
* We need to do this so that the version dropdown doesn't used cached HTML
* on Chrome on MacOS (see ARROW-15895)
*/
$(window).bind("pageshow", function(event) {
if (event.originalEvent.persisted) {
window.location.reload()
}
});

(function () {
// Load the rmarkdown tabset script
var script = document.createElement("script");
Expand Down

0 comments on commit ab55bba

Please sign in to comment.