Krinkle has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/378743 )
Change subject: zuul: Don't toggle panel when clicking Gerrit patch link
......................................................................
zuul: Don't toggle panel when clicking Gerrit patch link
Each patch set panel is clickable in its entirety. Clicks anywhere
on the header of the widget propagate to the wrapper element and
result in the panel being toggled.
This works as expected when clicking on non-interactive areas,
such as the title, ETA, background, or progress bar.
However, this doesn't work as expected when clicking on the
Gerrit patch link, which inadvertently also causes the panel
to be toggled.
Add logic to the click event handler to ignore the event if it
bubbled up from an anchor link.
Change-Id: Ifadf3dfabfc361e1e7d775a62c4c2643b0e2b2c2
---
M zuul-status/public_html/jquery.zuul.js
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/integration/docroot
refs/changes/43/378743/1
diff --git a/zuul-status/public_html/jquery.zuul.js
b/zuul-status/public_html/jquery.zuul.js
index 46c7785..4acc6e9 100644
--- a/zuul-status/public_html/jquery.zuul.js
+++ b/zuul-status/public_html/jquery.zuul.js
@@ -542,6 +542,10 @@
// Toggle showing/hiding the patchset when the header is
// clicked.
+ if (e.target.nodeName.toLowerCase() === 'a') {
+ // Ignore clicks from gerrit patch set link
+ return;
+ }
// Grab the patchset panel
var $panel = $(e.target).parents('.zuul-change');
var $body = $panel.children('.zuul-patchset-body');
--
To view, visit https://gerrit.wikimedia.org/r/378743
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifadf3dfabfc361e1e7d775a62c4c2643b0e2b2c2
Gerrit-PatchSet: 1
Gerrit-Project: integration/docroot
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits