Searching now hides the navigation menu
This commit is contained in:
parent
4c0249c2a8
commit
eb90140a60
|
@ -83,11 +83,21 @@ class Search extends React.PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
hideMenu() {
|
||||
var width = (window.innerWidth > 0) ? window.innerWidth : screen.width;
|
||||
if (width <= 720) {
|
||||
document.querySelector('.columns-area__panels__pane--navigational').className += ' visible';
|
||||
document.querySelector('div.search').className += ' visible';
|
||||
document.getElementById('menu-toggle-button').className = '';
|
||||
}
|
||||
}
|
||||
|
||||
handleKeyUp = (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
|
||||
this.props.onSubmit();
|
||||
this.hideMenu();
|
||||
|
||||
if (this.props.openInRoute) {
|
||||
this.context.router.history.push('/search');
|
||||
|
|
Loading…
Reference in New Issue