avoid using deprecated keydown attribute

pull/10616/head
Jade McGough 2017-05-08 16:10:05 -07:00
parent 1a2cafe485
commit 0e7f6f0f6c
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ browserHistory.listen(() => {
window.addEventListener('keyup', event => {
const escapeKeyCode = 27
if (event.keyCode === escapeKeyCode) {
if (event.key === 'Escape' || event.which === escapeKeyCode) {
dispatch(disablePresentationMode())
}
})