summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2017-12-12 20:29:44 -0500
committerAnthony G. Basile <blueness@gentoo.org>2017-12-12 20:29:55 -0500
commit73ce9c10188ce4f5014c97ad4c0f8c9f69410113 (patch)
treeac0b7b2f7cb14a145e2308d705033f89cebc736d /plugins/jetpack/modules/masterbar/tracks-events.js
parentUpdate wordpress-mobile-pack 3.2 (diff)
downloadblogs-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.js8
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;
}