Skip to content

Commit

Permalink
Work around for IE11 sidenav navigation bug (#2198)
Browse files Browse the repository at this point in the history
  • Loading branch information
chandlerprall authored Aug 5, 2019
1 parent 703d959 commit 9d5634e
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src-docs/src/components/guide_page/guide_page_chrome.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,18 @@ export class GuidePageChrome extends Component {
};

onClickRoute = () => {
this.setState(
{
search: '',
isSideNavOpenOnMobile: false,
},
this.scrollNavSectionIntoView
);
// timeout let's IE11 do its thing and update the url
// allowing react-router to navigate to the route
// otherwise IE11 somehow kills the navigation
setTimeout(() => {
this.setState(
{
search: '',
isSideNavOpenOnMobile: false,
},
this.scrollNavSectionIntoView
);
}, 0);
};

onButtonClick() {
Expand Down

0 comments on commit 9d5634e

Please sign in to comment.