tether icon indicating copy to clipboard operation
tether copied to clipboard

When using two different bodyElements, the zeroElement is reused between them causing position to be completely off

Open neryams opened this issue 3 years ago • 3 comments

This may be related to #279.

See example: https://stackblitz.com/edit/web-platform-xvi6jy?file=script.js To reproduce, click on the left red box, then click on the right red box. Note that the positions are correct. Now clicking on the left red box again will cause the popup to be placed incorrectly.

The zeroElement in the container is being reused for calculations on the html body element in bounds.js

neryams avatar Oct 05 '21 14:10 neryams

@neryams thanks for reporting this issue. Would you be able to open a PR with a fix?

RobbieTheWagner avatar Oct 05 '21 19:10 RobbieTheWagner

Here's a fork of the stackblitz with the edits in the PR to tether: https://stackblitz.com/edit/web-platform-qspqru?file=tether.js

Thanks!

neryams avatar Oct 05 '21 19:10 neryams

I can confirm, that @neryams changes fix the issue. @RobbieTheWagner would be great if you could have a look at this.

borisdiakur avatar Apr 03 '23 14:04 borisdiakur