mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 15:36:58 +00:00
Prevent clicks on bundled notif list from activating the bundle link
If you click "Expand" on a notification bundle, the list of individual notifications appears below. The list has a thin band of whitespace around it (with grey background). Clicking inside that whitespace, outside of the list items, would activate the bundle's primary link, even though the cursor state did not show that would happen. Change-Id: Id8c60503fa45f61df5bfaa07e0184634a5263c61
This commit is contained in:
parent
113da4ec5d
commit
de94e4ebe0
|
@ -49,6 +49,13 @@
|
|||
// work
|
||||
.css( 'display', 'none' );
|
||||
|
||||
// Prevent clicks on the list padding area from activating the primary link
|
||||
this.listWidget.$element.on( 'click', function ( e ) {
|
||||
if ( e.target.closest( 'a' ) === this.$element[ 0 ] ) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}.bind( this ) );
|
||||
|
||||
// Initialize closed
|
||||
this.expanded = false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue