[pve-devel] [PATCH manager] ui: inline novnc: always focus console panel after render

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Oct 5 14:19:49 CEST 2017


Enforce focus on the Inline CT/VM/Host Console panel backed by noVNC.

Else, if a Console is already active on VM A and we select VM B the
console there does not gets the focus as its now in the three and
regaining focus to the console is not fully intuitive - i.e. just
clicking on the console won't do the trick, you have to click on
specific spots (e.g. console panel header) or re open the console.

The only possible drawback of the focusing is that if one has the
console open, selects another VM he cannot navigate the tree down
with the arrow keys (as long as the console is open) - but thats
hardly a situation where one gets into and can be worked around.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 www/manager6/VNCConsole.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/www/manager6/VNCConsole.js b/www/manager6/VNCConsole.js
index b81aa77e..4b1b39ef 100644
--- a/www/manager6/VNCConsole.js
+++ b/www/manager6/VNCConsole.js
@@ -45,6 +45,10 @@ Ext.define('PVE.noVncConsole', {
 	});
 
 	me.callParent();
+
+	me.on('afterrender', function() {
+	    me.focus();
+	});
     }
 });
 
-- 
2.11.0





More information about the pve-devel mailing list