Last modified: 2014-10-01 23:37:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T73494, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71494 - handleLinkClick breaks navigation for links with sub-elements
handleLinkClick breaks navigation for links with sub-elements
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
GuidedTour (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Matthew Flaschen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-01 02:10 UTC by Matthew Flaschen
Modified: 2014-10-01 23:37 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Matthew Flaschen 2014-10-01 02:10:28 UTC
When a link has a sub-element, and you click the sub-element, it will navigate to 'undefined'.

This is because event.target is what you actually clicked.  If that is a sub-element, it won't have the href.

Reported by Jake Orlowitz; affects The Wikipedia Adventure which uses a <big> sub-element.
Comment 1 Ocaasi 2014-10-01 02:19:48 UTC
Is the only thing needed to do to avoid this to remove <big> tags from the name? ...For TWA that is doable as <big> is only being used to make an arrow larger and serves little function.  (So it's a bug, but perhaps lower priority).

(In reply to Matthew Flaschen from comment #0)
> When a link has a sub-element, and you click the sub-element, it will
> navigate to 'undefined'.
> 
> This is because event.target is what you actually clicked.  If that is a
> sub-element, it won't have the href.
> 
> Reported by Jake Orlowitz; affects The Wikipedia Adventure which uses a
> <big> sub-element.
Comment 2 Matthew Flaschen 2014-10-01 02:24:00 UTC
(In reply to Ocaasi from comment #1)
> Is the only thing needed to do to avoid this to remove <big> tags from the
> name? ...For TWA that is doable as <big> is only being used to make an arrow
> larger and serves little function.  (So it's a bug, but perhaps lower
> priority).

That would work around the bug.  However, I'm going to fix it today anyway (deploy time TBD).
Comment 3 Gerrit Notification Bot 2014-10-01 02:59:46 UTC
Change 164026 had a related patch set uploaded by Mattflaschen:
FIx handleLinkClick to handle sub-elements within links

https://gerrit.wikimedia.org/r/164026
Comment 4 Gerrit Notification Bot 2014-10-01 13:05:30 UTC
Change 164026 merged by jenkins-bot:
FIx handleLinkClick to handle sub-elements within links

https://gerrit.wikimedia.org/r/164026
Comment 5 Gerrit Notification Bot 2014-10-01 19:30:47 UTC
Change 164153 had a related patch set uploaded by Mattflaschen:
FIx handleLinkClick to handle sub-elements within links

https://gerrit.wikimedia.org/r/164153
Comment 6 Gerrit Notification Bot 2014-10-01 19:32:43 UTC
Change 164156 had a related patch set uploaded by Mattflaschen:
FIx handleLinkClick to handle sub-elements within links

https://gerrit.wikimedia.org/r/164156
Comment 7 Gerrit Notification Bot 2014-10-01 23:17:37 UTC
Change 164153 merged by jenkins-bot:
FIx handleLinkClick to handle sub-elements within links

https://gerrit.wikimedia.org/r/164153
Comment 8 Gerrit Notification Bot 2014-10-01 23:19:47 UTC
Change 164156 merged by jenkins-bot:
FIx handleLinkClick to handle sub-elements within links

https://gerrit.wikimedia.org/r/164156
Comment 9 Matthew Flaschen 2014-10-01 23:37:48 UTC
Deployed early to all WMF wikis.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links