mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-16 20:58:28 +00:00
Merge "Make reply links more robust so Google Translate won't break us"
This commit is contained in:
commit
1a67ab6d74
|
@ -50,7 +50,13 @@ ReplyLinksController.prototype.onReplyLinkClick = function ( e ) {
|
||||||
}
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
this.emit( 'link-click', $( e.target ).data( 'mw-comment' ).id, $( e.target ) );
|
// Browser plugins (such as Google Translate) may add extra tags inside
|
||||||
|
// the link, so find the containing link tag with the data we need.
|
||||||
|
var $link = $( e.target ).closest( 'a[data-mw-comment]' );
|
||||||
|
if ( !$link.length ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.emit( 'link-click', $link.data( 'mw-comment' ).id, $link );
|
||||||
};
|
};
|
||||||
|
|
||||||
ReplyLinksController.prototype.onAddSectionLinkClick = function ( e ) {
|
ReplyLinksController.prototype.onAddSectionLinkClick = function ( e ) {
|
||||||
|
|
Loading…
Reference in a new issue