Last modified: 2014-01-30 17:31:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T33682, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31682 - [Regression] broke Edittools for Special:Upload
[Regression] broke Edittools for Special:Upload
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.18.x
All All
: Normal normal with 1 vote (vote)
: Future release
Assigned To: Nobody - You can work on this!
: code-update-regression, javascript
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-13 22:33 UTC by AlexSm
Modified: 2014-01-30 17:31 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description AlexSm 2011-10-13 22:33:22 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
Comment 1 Derk-Jan Hartman 2011-10-15 15:38:14 UTC
we changed textarea id ???

Who did that ? changing id's is bad, there better be a good reason.
Comment 2 Mark A. Hershberger 2011-10-15 20:43:17 UTC
Where did the textarea id change?  who changed it?
Comment 3 Sam Reed (reedy) 2011-10-15 20:46:38 UTC
(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.
Comment 4 Mark A. Hershberger 2011-10-15 22:03:30 UTC
tagging bugs for Marcus to look at
Comment 5 Derk-Jan Hartman 2011-10-22 21:13:06 UTC
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
Comment 6 AlexSm 2011-10-25 19:43:56 UTC
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
Comment 7 Derk-Jan Hartman 2011-10-25 22:29:12 UTC
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.
Comment 8 Derk-Jan Hartman 2011-11-13 15:47:56 UTC
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 ?
Comment 9 Derk-Jan Hartman 2011-11-14 23:29:23 UTC
Fixed in r103074
Comment 10 Subfader 2012-01-10 14:49:59 UTC
I currently have it on http://www.mediawiki.org/wiki/Special:Upload in FF 9.01 and IE 8
Comment 11 Subfader 2012-01-10 15:05:59 UTC
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.
Comment 12 Derk-Jan Hartman 2012-01-10 18:38:36 UTC
Perhaps because it locally overwrites stuff with MediaWiki:Edittools.js ?
Comment 13 Derk-Jan Hartman 2012-01-10 18:42:13 UTC
Oh, wait it seems this was never ported to 1.18 of WMF.
Comment 14 AlexSm 2012-01-10 21:33:38 UTC
TheDJ, your r103074 fixed only .focus() handler but not the initial currentFocused=$( '#wpTextbox1' ), please re-read comment 11.
Comment 15 Krinkle 2012-05-05 17:19:46 UTC
(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.
Comment 16 Krinkle 2012-05-05 17:22:20 UTC
(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 ?
Comment 17 Subfader 2012-05-06 00:27:07 UTC
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.
Comment 18 Derk-Jan Hartman 2012-07-29 19:54:38 UTC
Fixed initial state of currentFocused in https://gerrit.wikimedia.org/r/16928
Comment 19 Derk-Jan Hartman 2012-08-23 17:00:22 UTC
I have abandoned this change, because I saw no reliable/consistent way of determining what the 'current focused' initial value should be.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links