https://bugzilla.wikimedia.org/show_bug.cgi?id=26620

           Summary: insertTags fails on Special:Upload when jquery is
                    enabled
           Product: MediaWiki
           Version: wikimedia-deployment
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: Normal
         Component: Javascript
        AssignedTo: d...@ucsc.edu
        ReportedBy: nx.devn...@gmail.com
                CC: tpars...@wikimedia.org


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' ) ) ) {

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to