mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-28 16:10:55 +00:00
Exclude redlink clicks from modalEditClicked event
This event is meant to track attempts to edit the page we are on, but also happened to catch clicks on "see talk page" links, in case that talk page doesn't exist yet. Bug: T204073 Change-Id: I1a471f81cc9390fc9e8665a7a336cf2dd7a063ab
This commit is contained in:
parent
8ac5b9c663
commit
287a2aafe9
|
@ -60,7 +60,9 @@
|
|||
*/
|
||||
events: util.extend( {}, Overlay.prototype.events, {
|
||||
'click a:not(.external):not([href*=edit])': 'onInternalClick',
|
||||
'click a[href*="edit"]': 'onEditClick'
|
||||
// Only register attempts to edit an existing page (should be the one we are on),
|
||||
// not internal clicks on redlinks to nonexistent pages:
|
||||
'click a[href*="edit"]:not([href*=redlink])': 'onEditClick'
|
||||
} ),
|
||||
|
||||
/**
|
||||
|
@ -123,6 +125,7 @@
|
|||
* Event that is triggered when an edit link inside the overlay is clicked. This is
|
||||
* primarily used for instrumenting page issues (see
|
||||
* https://meta.wikimedia.org/wiki/Schema:PageIssues).
|
||||
* The event will not be triggered in the case of red links.
|
||||
* @param {JQuery.Event} ev
|
||||
* @memberof PageIssuesOverlay
|
||||
* @instance
|
||||
|
|
Loading…
Reference in a new issue