I have a Google Spreadsheet file that displays a custom dialog using SpreadsheetApp.getUi().ShowModalDialog(...)
.
There is a script in this dialog box that saves some user values to the clipboard
navigator.clipboard.writeText(...)
This construct worked great until today. Now when I try to access the clipboard, I get an error
"NotAllowedError: Disabled in this document by Feature Policy."
I don't know how it was before, but now in the iframe container of the dialog box there is no permission for clipboard. Chrome and Firefox have the same result
<iframe id="sandboxFrame" allow="accelerometer *; ambient-light-sensor *; autoplay *; camera *; encrypted-media *; fullscreen *; geolocation *; gyroscope *; magnetometer *; microphone *; midi *; payment *; picture-in-picture *; speaker *; usb *; vibrate *; vr *" sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts" src="https://n-u5k3jk3vgvz7z7zd77h6oqbtfn7mio6cjscfeoi-0lu-script.googleusercontent.com/userCodeAppPanel">
</iframe>
Is there any way to set permission for Clipboard API in Apps Script html dialogs?