DHTMLXGRID CopyToClipBoard Operation in modals

Hi,

The copyToClipBoard operation isn’t working in a popup window,
I have the main page that contains a dhtmlxgrid and the CopyToClipBoard works very well, but when I call a pop up with another grid the function doesn’t work. Anyone can help me?

The onKeyPress event from main page is below
function onKeyPress(code, ctrl, shift) {
if (code == 67 && ctrl) {
myGrid.setCSVDelimiter("\t");
myGrid.copyBlockToClipboard();
};

		return true;
	}

And the onKeyPress event from pop up page is below:

function onKeyPressedBundle(code, ctrl, shift) {
if(code==67&&ctrl){
if (!grdPopup._selectionArea) return alert(“You need to select a block area in grid first”);
grdPopUp.setCSVDelimiter("\t");
grdPopUp.copyBlockToClipboard();
}
return true;
}

The name of the two grids are different and their functions are called with different names, I don’t know what this error can be.

Do you mean by popup a new browser window or some javascript popup library ( dhtmlxPopup or other one ) ?

Please be sure that the onKeyPress event is really triggered in the problematic case, it is the most suspicious part of the copy-to-clipboard process.

It’s called in new browser window.

The event is called correctly.
There is a weard behavior, because when I try to copy debugging on browser step by step the copy’s action work correctly,
but when I try to copy without debugging the copy’s operation doesn’t work