diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2017-12-12 20:29:44 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2017-12-12 20:29:55 -0500 |
commit | 73ce9c10188ce4f5014c97ad4c0f8c9f69410113 (patch) | |
tree | ac0b7b2f7cb14a145e2308d705033f89cebc736d /plugins/jetpack/modules/masterbar/tracks-events.js | |
parent | Update wordpress-mobile-pack 3.2 (diff) | |
download | blogs-gentoo-73ce9c10188ce4f5014c97ad4c0f8c9f69410113.tar.gz blogs-gentoo-73ce9c10188ce4f5014c97ad4c0f8c9f69410113.tar.bz2 blogs-gentoo-73ce9c10188ce4f5014c97ad4c0f8c9f69410113.zip |
Update jetpack 5.6
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'plugins/jetpack/modules/masterbar/tracks-events.js')
-rw-r--r-- | plugins/jetpack/modules/masterbar/tracks-events.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/jetpack/modules/masterbar/tracks-events.js b/plugins/jetpack/modules/masterbar/tracks-events.js index 7cf95e88..10b63f80 100644 --- a/plugins/jetpack/modules/masterbar/tracks-events.js +++ b/plugins/jetpack/modules/masterbar/tracks-events.js @@ -97,7 +97,7 @@ '#wp-admin-bar-user-info .ab-item,' + '.mb-trackable .ab-secondary'; - $( trackableLinks ).on( 'click touchstart', function( e ) { + $( trackableLinks ).on( 'click touchstart', function( e ) { if ( ! window.jpTracksAJAX || 'function' !== typeof( window.jpTracksAJAX.record_ajax_event ) ) { return; } @@ -105,7 +105,11 @@ var $target = $( e.target ), $parent = $target.closest( 'li' ); - if ( ! $parent ) { + if ( ! $target.is( 'a' ) ) { + $target = $target.closest( 'a' ); + } + + if ( ! $parent || ! $target ) { return; } |