This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add patch to che-theia 7.3.2 Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
dockerfiles/theia/src/patches/f255f5a8cb22010aacb8196c8a8f248e111e9945/clipbrd_patch.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |