Fix electron clipboard action (#1976)

* fix: 🐛 allow clipboard write action
This commit is contained in:
Dharini Jeeva authored and GitHub committed 2023-11-01 10:06:03 -07:00
1 parent f879bbb1ec
commit e2487b7e98
1 file changed
+5 -1
+5 -1
View File
@@ -185,7 +185,11 @@ app.on('ready', async () => {
// Disallow all permissions requests,
// per Electronegativity PERMISSION_REQUEST_HANDLER_GLOBAL_CHECK
ses.setPermissionRequestHandler((webContents, permission, callback) => {
/* eng-disable PERMISSION_REQUEST_HANDLER_JS_CHECK */
// We need to allow this for native clipboard usage
if (permission === 'clipboard-sanitized-write') {
// Approves the permissions request
return callback(true);
}
return callback(false);
});