Copy to clipboard crash


#1

Hello!
Has someone experienced issues with dhtmlx Grid while trying to copy to clipboard? I am using dhtmlx version 5.0.8 and have a crash while trying to execute .gridToClipboard(); The problem is “Uncaught TypeError: Illegal constructor” and I have found that is coming from “new Clipboard()” from this code:

dhtmlXGridObject.prototype.toClipBoard = function(a) {
if (window.clipboardData) {
window.clipboardData.setData(“Text”, a)
} else {
(new Clipboard()).copy(a)
}
}

Is there any external library that need to be included or am I missing something?


#2

dhtmlxgrid|_nxml.js extension should be included on the page for the gridToClipboard() method.
It is available in PRO version only.


#3

I get exactly the same error but we have PRO version and I see the ext file is loaded?. We are using the consolidated dhtmlx.js file and the plugin was loaded separately just to confirm but the error still happens…
Product Name: dhtmlxSuite
Version: 4.3
Edition: Professional
Browser is chrome latest version. Any ideas?


#4

Could you please, provide a complete demo or a demo link, where the problem could be reconstructed locally.