ParamQuery grid support forum

General Category => Bug Report => Topic started by: TonyLeech on June 05, 2026, 05:07:57 pm

Title: v11.1.0 Ctrl-C throws an error
Post by: TonyLeech on June 05, 2026, 05:07:57 pm
Hi Paramvir, I'm upgrading my grids to the latest version (v11.1.0) but it no longer performs copy with Ctrl-C.  It's throwing the following error...

pqgrid.min.js:13 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'write')
    at Object.copy (pqgrid.min.js:13:97225)
copy @ pqgrid.min.js:13
await in copy
copy @ pqgrid.min.js:13
onCopy @ pqgrid.min.js:13
(anonymous) @ pqgrid.min.js:13

Paste with Ctrl-V is working ok, but only with data previously in the clipboard.  Nothing new gets added with Ctrl-C.


Title: Re: v11.1.0 Ctrl-C throws an error
Post by: paramvir on June 05, 2026, 05:38:31 pm
Copy and paste functionality in recent versions of ParamQuery Grid relies on the modern
Code: [Select]
navigator.clipboard API. The error "Cannot read properties of undefined (reading 'write')" explicitly indicates that the browser is blocking access to this API.

To resolve this issue, please ensure the following environment requirements are met:

Code: [Select]
navigator.clipboard object will be undefined if your application is running over standard
Code: [Select]
http:// on a remote server or IP address. It will only function over
Code: [Select]
https:// or
Code: [Select]
http://localhost
Title: Re: v11.1.0 Ctrl-C throws an error
Post by: TonyLeech on June 05, 2026, 06:33:16 pm
Understood.  I'm using http in a local site environment but from a different server so I don't think I can use localhost.

Are you planning a workaround to allow this in future or are we now locked into https requirement?
Title: Re: v11.1.0 Ctrl-C throws an error
Post by: paramvir on June 05, 2026, 10:18:02 pm
Because this security restriction is enforced directly by the browser engine (Chromium, WebKit, Gecko) rather than the grid framework, it is unfortunately impossible to implement a workaround within the software itself. If the site is served over
Code: [Select]
http:// (and is not localhost), the browser completely removes the
Code: [Select]
navigator.clipboard object from the global window scope for security reasons.

However, since you are in a local development/testing environment, you can easily bypass this browser restriction using one of the following solutions:

Solution 1: Enable the Insecure Origin Flag in Chrome/Edge (Easiest for testing) 
You can explicitly tell your browser to treat your specific local HTTP URL as a secure context.


Solution 2: Map the Remote Server to Localhost via SSH 
If you have SSH access to that server, you can map its web port directly to your machine. This tricks the browser into seeing it as a local site: