Skip to content

Unexpected behavior when element is larger than target #271

Open
@Justineo

Description

@Justineo

tether-mid

It's a case on http://tether.io/ with a little modification (I tweaked the size of the target element a little bit and made the window horizontally scrollable):

new Tether({
  element: yellowBox,
  target: greenBox,
  attachment: 'top left',
  targetAttachment: 'bottom left',
  constraints: [
    {
      to: 'window',
      attachment: 'together'
    }
  ]
});

As you can see, Tether isn't handling such constraint correctly on horizontal direction: it isn't flipping the element when there is enough space on the left when its right side is out of window's right border, and when it goes out of window's left border, it flipped unexpectedly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions