Merge "Added keyboard shortcut (ESC key) to close notifications flyout"

This commit is contained in:
jenkins-bot 2014-04-06 11:59:05 +00:00 committed by Gerrit Code Review
commit 0dcfd39eb2

View file

@ -337,5 +337,13 @@
mw.echo.overlay.removeOverlay();
}
} );
// Closes the notifications overlay when ESC key pressed
$( document ).on( 'keydown', function ( e ) {
if ( e.which === 27 ) {
mw.echo.overlay.removeOverlay();
}
} );
} );
} )( jQuery, mediaWiki );