(e)
| 349 | } |
| 350 | |
| 351 | function onKeyDownClosed(e) { |
| 352 | e = e || window.event; |
| 353 | // Key downs came from menu button |
| 354 | if (e.target === document.getElementById('react-burger-menu-btn')) { |
| 355 | switch (e.key) { |
| 356 | case ARROW_DOWN: |
| 357 | case SPACE: |
| 358 | // If down arrow, space or enter, open menu and focus on first menuitem |
| 359 | toggleMenu(); |
| 360 | break; |
| 361 | case ARROW_UP: |
| 362 | // If arrow up, open menu and focus on last menuitem |
| 363 | toggleMenu({ focusOnLastItem: true }); |
| 364 | break; |
| 365 | } |
| 366 | } |
| 367 | } |
| 368 | |
| 369 | function handleOverlayClick() { |
| 370 | if (props.disableOverlayClick === true || typeof props.disableOverlayClick === 'function' && props.disableOverlayClick()) { |
nothing calls this directly
no test coverage detected