Search code examples
javascriptzeroclipboard

ZeroClipboard: .swf being positioned improperly


Trying to get zeroclipboard positioned properly, and things aren't working quite as expected, even while following the Wiki.

I've got my clipboard area contained within a separate div, and then I'm gluing to both of them. The problem is that the clipboard movie is consistently appearing about 10px too high, and 10px to far to the left (thus removing the tops of tall characters and the last several characters in the box from the clickable area). Has anyone seen this problem or found a fix? Code below:

<div class="ad-copy-container" style="display:inline-block;position:relative;">
  <span class="ad-id-string-text">Copy Button Text</div>
</div>

<script type="text/javascript">
// Clip Stuff
copyButton.glue('.ad-id-string-text','.ad-copy-container');
</script>

Solution

  • Ended up hacking in a time delay which resized the container and embed. Not a great solution, but it works.