FileReader
FileReader copied to clipboard
Hidden button not repositioned on browser resize
It seems that if the user resizes the browser which moves the underlying button, the floating import button that is hidden doesn't move to match its position.
i had a similar problem. it seems it only positions the transparent swf once. instead, you can position it on every mouseover of the input. i'm not really sure what currentTarget does...but i only have one file upload button so it doesn't matter to me.
.mouseover(function (e) {
if (id !== currentTarget) {
e = e || window.event;
currentTarget = id;
FileAPIProxy.swfObject.mouseover(id);
// FileAPIProxy.container
// .height(input.outerHeight())
// .width(input.outerWidth())
// .css(input.offset());
}
// Move the container to where our input is every single time!
// The reason? well, if the page changes, you're stuck with the swf being in the wrong place.
FileAPIProxy.container
.height(input.outerHeight())
.width(input.outerWidth())
.css(input.offset());
})
Binding to the window resize event and then automatically repositioning works nicely too.