Skip to content
This repository was archived by the owner on Mar 27, 2026. It is now read-only.
This repository was archived by the owner on Mar 27, 2026. It is now read-only.

Hidden button not repositioned on browser resize #36

Open

Description

@Deklin

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.

Activity

  1. btrauma8 commented on May 10, 2013

    @btrauma8

    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());
    })
  2. thecountofzero commented on Oct 26, 2013

    @thecountofzero

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions