Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

ZeroClipboard creates large invisible barrier and prevents clicking anywhere #666

Open
PandaWood opened this issue Aug 23, 2016 · 1 comment

Comments

@PandaWood
Copy link

PandaWood commented Aug 23, 2016

Hi,

In one case, where I include ZeroClipboard.js but don't new it up or use it at all...
On invoking a text editor (happens to be a Kendo Editor, but I don't think this issue can be blamed on Kendo) - a large part of my interface suddenly becomes frozen and can't be clicked.

This creates a significant bug, in that the entire interface now doesn't work

I found that the "unclickable barrier" is there because a massive, invisible div "global-zeroclipboard-html-bridge" set to a size of 1026px and 301 height.
I don't know why it appears - the size might be the same size as the TextArea I just put the cursor in.

I've updated to 2.3.1-beta to make sure it's not an older version... and I also include jquery.zeroclipboard - though please keep in mind: in this case, I don't actually invoke or use either of them. They're just being included. There's not even a section of the page that uses zeroclipboard, in ANY WAY. It is completely unused other than being included as a js include.

Now, admittedly, there may be something new in the Kendo Editor widget that "kicks this off" that wasn't there before. In fact that's likely.
But it still seems like a generic issue with ZeroClipboard.
Why would it appear as a massive, impenetrable shape, covering my entire UI, when I haven't even invoked it or newed it up?

More importantly, how can I stop it (without hacking)?

@PandaWood PandaWood changed the title ZeroClipboard creates large invisible barrier to input form ZeroClipboard creates large invisible barrier and prevents clicking anywhere Aug 23, 2016
@JamesMGreene
Copy link
Member

JamesMGreene commented Nov 14, 2016

I can't see how this would be possible if you aren't at least invoking the ZeroClipboard.create() method (either directly or indirectly).

You are sure you do not have a snippet something like the following somewhere (taken from the jquery.zeroclipboard README)?

<script>
  jQuery(document).ready(function($) {
    $("body")
      .on("copy", ".zclip", function(/* ClipboardEvent */ e) {
        e.clipboardData.clearData();
        e.clipboardData.setData("text/plain", $(this).data("zclip-text"));
        e.preventDefault();
      });
  });
</script>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants