Tinaj1234 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/123638

Change subject: Added keyboard shortcut (ESC key) to close notifications flyout
......................................................................

Added keyboard shortcut (ESC key) to close notifications flyout

Notification flyout is closed when ESC key is pressed

Bug: 53588
Change-Id: I220affcc383c943ca9d977bc4014d45904ce06c2
---
M modules/overlay/ext.echo.overlay.js
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/38/123638/1

diff --git a/modules/overlay/ext.echo.overlay.js 
b/modules/overlay/ext.echo.overlay.js
index d29ca32..07a2bb5 100644
--- a/modules/overlay/ext.echo.overlay.js
+++ b/modules/overlay/ext.echo.overlay.js
@@ -337,5 +337,13 @@
                                mw.echo.overlay.removeOverlay();
                        }
                } );
+
+               // Closes the notifications overlay when ESC key pressed
+               $( document ).bind( 'keydown', function ( e ) {
+                       if ( e.which == 27 ) {
+                               mw.echo.overlay.removeOverlay();
+                       }
+               } );
+               
        } );
 } )( jQuery, mediaWiki );

-- 
To view, visit https://gerrit.wikimedia.org/r/123638
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I220affcc383c943ca9d977bc4014d45904ce06c2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Tinaj1234 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to