completely icon indicating copy to clipboard operation
completely copied to clipboard

Older browser compatibility issue (Firefox 3.5.9)

Open canihavesomecoffee opened this issue 11 years ago • 2 comments

Hello,

I'm implementing this lovely piece of code into a new project, and I have some users that are stuck (corporate policy) to Firefox 3.5.9. Complete.ly won't launch on this firefox version due to line 34:

var txtHint = txtInput.cloneNode();

Stating that there is an argument missing:

error

The fix for this is quite simple:

var txtHint = txtInput.cloneNode(true);

Assuming the behaviour you intended is a deep clone and not a shallow one (According to the MDN (https://developer.mozilla.org/en-US/docs/Web/API/Node.cloneNode) the default assumption between FF 13-28 was true, starting from 29 it is false. They recommend adding the argument always).

canihavesomecoffee avatar Apr 22 '14 16:04 canihavesomecoffee

HI wforums, you have got a point. (and to be honest you are not the first one who's told me that) The code should change to txtInput.cloneNode(true); If and when I get a chance to make a new release I will put that change in.

In the meantime please work-around.

lorenzoongithub avatar Apr 22 '14 20:04 lorenzoongithub

Hello,

I have modified my own copy already, so that's no problem... The fix is easy enough :)

Thanks for aknowledging the issue though.

canihavesomecoffee avatar Apr 22 '14 21:04 canihavesomecoffee