Page MenuHomePhabricator

Do not change targets to javascript:void(0); on JavaScript load for various "edit" links
Closed, ResolvedPublic

Description

Instead, call event.preventDefault() on their onclick event.

Otherwise, with JavaScript loaded, midclicking the link (= open a new tab) creates a new empty page at javascript:void(0);.


Version: master
Severity: normal

Details

Reference
bz56090

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
InvalidNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolvedadrianheine
ResolvedNone
ResolvedNone
ResolvedNone
InvalidNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolvedthiemowmde
ResolvedNone
DeclinedNone
Resolvedthiemowmde
DeclinedLydia_Pintscher
DeclinedNone
InvalidNone
Resolvedthiemowmde
InvalidNone
DeclinedNone
OpenNone
OpenNone
Resolvedadrianheine
Resolvedadrianheine
Resolvedadrianheine
ResolvedNone
Resolvedadrianheine
InvalidNone
Declined Jonas
ResolvedNone
Resolvedadrianheine
Resolvedadrianheine
Invalidthiemowmde
Resolvedadrianheine
Resolvedthiemowmde
OpenNone
OpenNone
ResolvedLadsgroup
ResolvedLea_Lacroix_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
Resolvedmatej_suchanek
ResolvedLea_Lacroix_WMDE
DeclinedNone

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:30 AM
bzimport set Reference to bz56090.
bzimport added a subscriber: Unknown Object (MLST).

As far as I can tell, the targets aren't actually changed. Instead, every single edit link on the page is actually removed/deleted. ($( 'td.wb-editsection' ).empty(); $( 'span.wb-editsection, div.wb-editsection' ).remove(); in wikibase.ui.entityViewInit.js) New ones, frequently hundreds of them, are built from scratch later on, with the target as javascript:void(0). That's probably awful for performance.

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
He7d3r added a project: good first task.
He7d3r set Security to None.

While the linked change is an improvement, I would prefer to [use buttons](http://stackoverflow.com/a/12642009/55965) for elements which don't link somewhere (aka don't work without JS).

Linked change is merged. Are there more of these?

Snaterlicious claimed this task.
Snaterlicious removed Snaterlicious as the assignee of this task.
adrianheine raised the priority of this task from Low to High.Jan 29 2015, 9:58 AM
adrianheine moved this task from Backlog to Done on the § Wikidata-Sprint-2015-01-21 board.