From 3954ae149a6d734146e2e71a32f34ad3d45aa3b8 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Sun, 13 Jun 2010 10:57:23 -0500 Subject: [PATCH] Fix mouse focus issues. --- include/default_controls.js | 7 +++++++ vnc.js | 3 +++ 2 files changed, 10 insertions(+) diff --git a/include/default_controls.js b/include/default_controls.js index 2ad9d17e..7d969a02 100644 --- a/include/default_controls.js +++ b/include/default_controls.js @@ -55,6 +55,13 @@ load: function(target) { ['',''])[1]; $('VNC_encrypt').checked = (url.match(/encrypt=([A-Za-z0-9]*)/) || ['',''])[1]; + + $('VNC_screen').onmousemove = function () { + // Unfocus clipboard when over the VNC area + if (RFB.clipboardFocus) { + $('VNC_clipboard_text').blur(); + } + }; }, updateState: function(state, msg) { diff --git a/vnc.js b/vnc.js index 4a178fd0..adf79f2c 100644 --- a/vnc.js +++ b/vnc.js @@ -1282,6 +1282,7 @@ mouseDown: function(e) { RFB.mouse_arr = RFB.mouse_arr.concat( RFB.pointerEvent(x, y) ); RFB.flushClient(); + return false; }, mouseUp: function(e) { @@ -1295,6 +1296,7 @@ mouseUp: function(e) { RFB.mouse_arr = RFB.mouse_arr.concat( RFB.pointerEvent(x, y) ); RFB.flushClient(); + return false; }, mouseMove: function(e) { @@ -1326,6 +1328,7 @@ mouseWheel: function (e) { RFB.mouse_buttonMask ^= bmask; RFB.mouse_arr = RFB.mouse_arr.concat( RFB.pointerEvent(x, y) ); RFB.flushClient(); + return false; },