mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-24 07:34:11 +00:00
Fix TypeError on <a> with no href
HTML5 allows <a> elements with no href="..." attribute. We do this in Wikibase/Wikidata in a few places. Hovering these <a> elements causes TypeErrors. This is a hotfix. Please see Ie340648 for a much more advanced fix. Change-Id: Ib20ef8348c964a6ba736d0fc76909fd4d496c11e
This commit is contained in:
parent
d229877afb
commit
bf4016ecf1
|
@ -144,6 +144,7 @@
|
|||
// No popup if scrolling or on certain kinds of links.
|
||||
if (
|
||||
mw.popups.scrolled || // Prevents hovering on popups while scrolling
|
||||
!href ||
|
||||
href.indexOf( '?' ) !== -1 ||
|
||||
href.indexOf( 'javascript:' ) === 0 || // jshint ignore:line
|
||||
href.indexOf( location.origin + location.pathname + '#' ) === 0
|
||||
|
|
Loading…
Reference in a new issue