fix Edge 18 and under clipboard

This commit is contained in:
matt 2021-10-15 19:34:01 +00:00
parent 37c41c60f6
commit a36f941493
1 changed files with 4 additions and 1 deletions

View File

@ -2502,7 +2502,10 @@ export default class RFB extends EventTargetMixin {
if (mime == "text/plain") {
textdata = new TextDecoder().decode(data);
//textdata = new TextDecoder().decode(data);
for (let i = 0; i < data.length; i++) {
textdata+=String.fromCharCode(data[i]);
}
if ((textdata.length > 0) && "\0" === textdata.charAt(textdata.length - 1)) {
textdata = textdata.slice(0, -1);