mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
Merge "DesktopArticleTarget.init: Ignore fake section edit links added by gadgets"
This commit is contained in:
commit
2dd4987b57
|
@ -840,6 +840,11 @@
|
|||
// Add section is currently a wikitext-only feature
|
||||
'#ca-addsection a'
|
||||
).each( function () {
|
||||
if ( !this.href ) {
|
||||
// Not a real link, probably added by a gadget or another extension (T328094)
|
||||
return;
|
||||
}
|
||||
|
||||
var linkUrl;
|
||||
try {
|
||||
linkUrl = new URL( this.href );
|
||||
|
@ -1227,6 +1232,11 @@
|
|||
* @param {string} [section] Override edit section, taken from link URL if not specified
|
||||
*/
|
||||
onEditSectionLinkClick: function ( mode, e, section ) {
|
||||
if ( !e.target.href ) {
|
||||
// Not a real link, probably added by a gadget or another extension (T328094)
|
||||
return;
|
||||
}
|
||||
|
||||
var linkUrl;
|
||||
try {
|
||||
linkUrl = new URL( e.target.href );
|
||||
|
|
Loading…
Reference in a new issue