Last modified: 2014-01-30 17:31:26 UTC
MediaWiki:Editools stopped working on Special:Upload since MW 1.18 changed textarea Id I guess the easiest way to fix this is to add #wpUploadDescription to the list of these inputs: $('...').focus( function() { currentFocused = $(this); } See http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/resources/mediawiki.action/mediawiki.action.edit.js?view=markup
we changed textarea id ??? Who did that ? changing id's is bad, there better be a good reason.
Where did the textarea id change? who changed it?
(In reply to comment #1) > we changed textarea id ??? > > Who did that ? changing id's is bad, there better be a good reason. No, we haven't.
tagging bugs for Marcus to look at
Possibly talking about the old upload wizard on Commons, it's a gadget now, and activates when you visit Special:Upload there. In that case, related to bug 31566
Sorry for the wrong assumption about textarea Id but the bug is still valid. Try to use edittools e.g. at http://meta.wikimedia.org/wiki/Special:Upload (many other projects have some local JS modifications). New explanation: prior to MW1.18 insertTags() would take document.getElementsByTagName('textarea')[0] in the absense of default editform. See http://svn.wikimedia.org/viewvc/mediawiki/branches/REL1_17/phase3/skins/common/edit.js?view=markup
Right. So inserttags doesnt work for wpUploadDescription anymore now, because we don't have the fallback for textarea[0] anymore. So either we need to do as i suggested in 31566, or just bind focus to all texteareas and input fields within the content areas.
Any comments on where to go with this ? Shall I go: .focus( '#wpTextbox1, .wpEdittoolsText') and then add wpEdittoolsText class to all elements we would like the edittools to work for (upload field, editsummary fields, proofread fields) ? Or shall i just do it like .focus( 'textarea, input[type=text]') ??? Which way would be preferred ?
Fixed in r103074
I currently have it on http://www.mediawiki.org/wiki/Special:Upload in FF 9.01 and IE 8
My resources/mediawiki.action/mediawiki.action.edit.js reads var currentFocused = $( '#wpTextbox1' ); This only works on normal page editing. The textarea on Special:Upload is #wpUploadDescription and only works if you click into it first.
Perhaps because it locally overwrites stuff with MediaWiki:Edittools.js ?
Oh, wait it seems this was never ported to 1.18 of WMF.
TheDJ, your r103074 fixed only .focus() handler but not the initial currentFocused=$( '#wpTextbox1' ), please re-read comment 11.
(mass change) * 1.18.0 and 1.19.0 have been released already. * Moving open bugs targeted for 1.18.0 or 1.19.0 to Mysterious future. * Please re-target them to 1.19.x or 1.20.0 if needed.
(In reply to comment #14) > TheDJ, your r103074 fixed only .focus() handler but not the initial > currentFocused=$( '#wpTextbox1' ), please re-read comment 11. Can you test it again? The focus event handler sets `currentFocused`. So when you focus that area on the upload page, it works, right ?
http://www.mediawiki.org/wiki/Special:Upload Still only works after you clicked into it. That itself is evry user unfriendly plus the behaviour differs from the normal edit page.
Fixed initial state of currentFocused in https://gerrit.wikimedia.org/r/16928
I have abandoned this change, because I saw no reliable/consistent way of determining what the 'current focused' initial value should be.