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:
Bartosz Dziewoński 2023-12-16 02:49:25 +01:00
parent 113da4ec5d
commit de94e4ebe0

View file

@ -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;