tether icon indicating copy to clipboard operation
tether copied to clipboard

Unexpected behavior when element is larger than target

Open Justineo opened this issue 8 years ago • 0 comments

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.

Justineo avatar Sep 25 '17 04:09 Justineo