Bugfix/kasm 2242 clipboard sync (#26)
* KASM-2242 clipboard behavior correction * remove clipboard length check Co-authored-by: matt <matt@kasmweb.com>
This commit is contained in:
parent
ad1fc1f06d
commit
df9c9d0d96
|
@ -459,6 +459,8 @@ const UI = {
|
||||||
.addEventListener('change', UI.clipboardSend);
|
.addEventListener('change', UI.clipboardSend);
|
||||||
document.getElementById("noVNC_clipboard_clear_button")
|
document.getElementById("noVNC_clipboard_clear_button")
|
||||||
.addEventListener('click', UI.clipboardClear);
|
.addEventListener('click', UI.clipboardClear);
|
||||||
|
|
||||||
|
window.addEventListener("focus", UI.copyFromLocalClipboard);
|
||||||
},
|
},
|
||||||
|
|
||||||
// Add a call to save settings when the element changes,
|
// Add a call to save settings when the element changes,
|
||||||
|
@ -1947,8 +1949,6 @@ const UI = {
|
||||||
keepVirtualKeyboard(event) {
|
keepVirtualKeyboard(event) {
|
||||||
const input = document.getElementById('noVNC_keyboardinput');
|
const input = document.getElementById('noVNC_keyboardinput');
|
||||||
|
|
||||||
UI.copyFromLocalClipboard();
|
|
||||||
|
|
||||||
// Only prevent focus change if the virtual keyboard is active
|
// Only prevent focus change if the virtual keyboard is active
|
||||||
if (document.activeElement != input) {
|
if (document.activeElement != input) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -764,6 +764,7 @@ export default class RFB extends EventTargetMixin {
|
||||||
}
|
}
|
||||||
|
|
||||||
let h = hashUInt8Array(data);
|
let h = hashUInt8Array(data);
|
||||||
|
// avoid resending the same data if larger than 64k
|
||||||
if (h === this._clipHash) {
|
if (h === this._clipHash) {
|
||||||
Log.Debug('No clipboard changes');
|
Log.Debug('No clipboard changes');
|
||||||
return;
|
return;
|
||||||
|
@ -802,6 +803,7 @@ export default class RFB extends EventTargetMixin {
|
||||||
|
|
||||||
if (!h) {
|
if (!h) {
|
||||||
h = hashUInt8Array(data);
|
h = hashUInt8Array(data);
|
||||||
|
// avoid resending the same data if larger than 64k
|
||||||
if (h === this._clipHash) {
|
if (h === this._clipHash) {
|
||||||
Log.Debug('No clipboard changes');
|
Log.Debug('No clipboard changes');
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue