Page MenuHomePhabricator

insertTags fails on Special:Upload when jquery is enabled
Closed, ResolvedPublic

Description

Author: Nx.devnull

Description:
edit.js has the following line at the beginning of function insertTags:

if ( typeof $j != 'undefined' && typeof $j.fn.textSelection != 'undefined' &&

			( currentFocused.nodeName.toLowerCase() == 'iframe' || currentFocused.id == 'wpTextbox1' ) ) {

however, on Special:Upload, currentFocused will be null, and this will fail when $j is not undefined. If $j is undefined, it will skip that condition and jump to the next part that correctly finds the upload description textarea, and everything will work.

This line should be changed to:

if ( typeof $j != 'undefined' && typeof $j.fn.textSelection != 'undefined' &&

			( currentFocused && (currentFocused.nodeName.toLowerCase() == 'iframe' || currentFocused.id == 'wpTextbox1' ) ) ) {

Version: unspecified
Severity: minor

Details

Reference
bz26620

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:15 PM
bzimport set Reference to bz26620.

Fixed in r79865, fix deployed.