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