mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
Fix "copy link to clipboard" for large file Sends (#949)
* Throw error if execCommand('copy') is disabled
* Use dialog for file Send creation success
* Show popup modal after long Send file uploads
* fix linting
* bump jslib
This commit is contained in:
@@ -245,7 +245,10 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
|
||||
textarea.select();
|
||||
try {
|
||||
// Security exception may be thrown by some browsers.
|
||||
doc.execCommand('copy');
|
||||
const copyEnabled = doc.execCommand('copy');
|
||||
if (!copyEnabled) {
|
||||
throw new Error('Command unsupported or disabled');
|
||||
}
|
||||
} catch (e) {
|
||||
// tslint:disable-next-line
|
||||
console.warn('Copy to clipboard failed.', e);
|
||||
|
||||
Reference in New Issue
Block a user