r112166 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112165‎ | r112166 | r112167 >
Date:23:50, 22 February 2012
Author:brion
Status:reverted
Tags:gerritmigration 
Comment:
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) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js
@@ -414,6 +414,10 @@
415415
416416 // we explicitly move the file input to cover the upload button
417417 upload.ui.moveFileInputToCover( '#mwe-upwiz-add-file' );
 418+ // do it again in case the layout didn't update immediately
 419+ setTimeout(function() {
 420+ upload.ui.moveFileInputToCover( '#mwe-upwiz-add-file' );
 421+ }, 50);
418422
419423 // we bind to the ui div since unbind doesn't work for non-DOM objects
420424

Follow-up revisions

RevisionCommit summaryAuthorDate
r112167MFT r112166reedy23:53, 22 February 2012
r112229May or may not help with bug 34601 UW mispositioned file control - still can'...brion19:28, 23 February 2012
r112248Another stab at bug 34601: UploadWizard positioning issues with hidden file i...brion22:04, 23 February 2012
r114400Revert r112166, r112229, r112248, r113584, r113591, r114349: unreviewed revis...catrope20:21, 21 March 2012

Status & tagging log