Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/201590
Change subject: Make all the card link to the page ...................................................................... Make all the card link to the page Don't break web by wrapping a link in a link Bug: T92664 Change-Id: I34eb0c1bbf03c0d663d0289d6979b5599a4d3097 --- M resources/ext.gather.special/init.js 1 file changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather refs/changes/90/201590/1 diff --git a/resources/ext.gather.special/init.js b/resources/ext.gather.special/init.js index 919fe98..e1a7bbc 100644 --- a/resources/ext.gather.special/init.js +++ b/resources/ext.gather.special/init.js @@ -31,7 +31,20 @@ } $( function () { + var cancelClick; addOverlayManagerRoutes(); $( '.collection-actions' ).addClass( 'visible' ); + + // errg all sorts of evil. Moiz made me do this. + $( '.collection-item' ).on( 'mouseup', function ( ev ) { + var url = $( ev.currentTarget ).find( 'a' ).attr( 'href' ); + if ( !cancelClick ) { + window.location.href = url; + } + } ).on( 'mousemove ontouchmove', function () { + cancelClick = true; + } ).on( 'touchstart mousedown', function () { + cancelClick = false; + } ); } ); }( mw.mobileFrontend, jQuery ) ); -- To view, visit https://gerrit.wikimedia.org/r/201590 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34eb0c1bbf03c0d663d0289d6979b5599a4d3097 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Gather Gerrit-Branch: master Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits