mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 16:04:35 +00:00
Merge "Added keyboard shortcut (ESC key) to close notifications flyout"
This commit is contained in:
commit
0dcfd39eb2
|
@ -337,5 +337,13 @@
|
||||||
mw.echo.overlay.removeOverlay();
|
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 );
|
} )( jQuery, mediaWiki );
|
||||||
|
|
Loading…
Reference in a new issue