Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Add patch to che-theia 7.3.2 (#567)
Browse files Browse the repository at this point in the history
* Add patch to che-theia 7.3.2

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
  • Loading branch information
evidolob committed Nov 29, 2019
1 parent ad8e4f4 commit 516e8ea
Showing 1 changed file with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff --git a/packages/core/src/browser/browser-clipboard-service.ts b/packages/core/src/browser/browser-clipboard-service.ts
index 82be81cc4..fd84ed6ab 100644
--- a/packages/core/src/browser/browser-clipboard-service.ts
+++ b/packages/core/src/browser/browser-clipboard-service.ts
@@ -56,13 +56,13 @@ export class BrowserClipboardService implements ClipboardService {
It can be enabled by 'dom.events.testing.asyncClipboard' preference on 'about:config' page. Then reload Theia.
Note, it will allow FireFox getting full access to the system clipboard.`);
}
- throw new Error('Failed reading clipboard content.');
+ return '';
}
}
if (permission.state === 'denied') {
// most likely, the user intentionally denied the access
- this.messageService.error("Access to the clipboard is denied. Check your browser's permission.");
- throw new Error('Access to the clipboard is denied.');
+ this.messageService.warn("Access to the clipboard is denied. Check your browser's permission.");
+ return '';
}
return this.getClipboardAPI().readText();
}
@@ -84,13 +84,13 @@ export class BrowserClipboardService implements ClipboardService {
It can be enabled by 'dom.events.testing.asyncClipboard' preference on 'about:config' page. Then reload Theia.
Note, it will allow FireFox getting full access to the system clipboard.`);
}
- throw new Error('Failed writing the the clipboard.');
+ return;
}
}
if (permission.state === 'denied') {
// most likely, the user intentionally denied the access
- this.messageService.error("Access to the clipboard is denied. Check your browser's permission.");
- throw new Error('Access to the clipboard is denied.');
+ this.messageService.warn("Access to the clipboard is denied. Check your browser's permission.");
+ return;
}
return this.getClipboardAPI().writeText(value);
}

0 comments on commit 516e8ea

Please sign in to comment.