FileReader icon indicating copy to clipboard operation
FileReader copied to clipboard

Hidden button not repositioned on browser resize

Open Deklin opened this issue 12 years ago • 2 comments

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.

Deklin avatar Apr 03 '13 04:04 Deklin

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());
})

btrauma8 avatar May 10 '13 21:05 btrauma8

Binding to the window resize event and then automatically repositioning works nicely too.

thecountofzero avatar Oct 26 '13 00:10 thecountofzero