Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hidden button not repositioned on browser resize #36

Open
Deklin opened this issue Apr 3, 2013 · 2 comments
Open

Hidden button not repositioned on browser resize #36

Deklin opened this issue Apr 3, 2013 · 2 comments

Comments

@Deklin
Copy link

Deklin commented Apr 3, 2013

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.

@btrauma8
Copy link

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

@thecountofzero
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants