1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-06 00:48:08 +02:00

Modified Chrome to pass in null unicode on clear

This commit is contained in:
Matt Smith 2020-07-09 12:25:46 -05:00
parent abded9afcf
commit 689f39d365

View File

@ -207,6 +207,10 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
this.clipboardWriteCallback(text, clearMs);
}
} else if (doc.queryCommandSupported && doc.queryCommandSupported('copy')) {
if(this.isChrome() && text === '') {
text = '\u0000';
}
const textarea = doc.createElement('textarea');
textarea.textContent = text == null || text === '' ? ' ' : text;
// Prevent scrolling to bottom of page in MS Edge.