https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112166

Revision: 112166
Author:   brion
Date:     2012-02-22 23:50:39 +0000 (Wed, 22 Feb 2012)
Log Message:
-----------
Semi-wild stab at bug 34601: 'drop media file to donate here' sometimes 
silently fails in UploadWizard

The hidden file input box gets positioned over a button that it's covering, 
since you can't just style the input to something sane.
For some reason, sometimes this initial position is wrong and totally off from 
where it belongs.

This might be due to some weird initialization order thing; in theory all the 
CSS should already be loaded and applied before we start running any of the JS 
in the same module so we don't expect it to be that. Could be some unrelated 
bit of behavior, though.

Attempting to reposition the file input shortly after we initially do, see if 
that helps any.

Modified Paths:
--------------
    trunk/extensions/UploadWizard/resources/mw.UploadWizard.js

Modified: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
===================================================================
--- trunk/extensions/UploadWizard/resources/mw.UploadWizard.js  2012-02-22 
23:34:08 UTC (rev 112165)
+++ trunk/extensions/UploadWizard/resources/mw.UploadWizard.js  2012-02-22 
23:50:39 UTC (rev 112166)
@@ -414,6 +414,10 @@
 
                // we explicitly move the file input to cover the upload button
                upload.ui.moveFileInputToCover( '#mwe-upwiz-add-file' );
+               // do it again in case the layout didn't update immediately
+               setTimeout(function() {
+                       upload.ui.moveFileInputToCover( '#mwe-upwiz-add-file' );
+               }, 50);
 
                // we bind to the ui div since unbind doesn't work for non-DOM 
objects
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to