mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Showing menu whenever mouse leaves document is too aggressive ... just using menuControl for now (see #94).
This commit is contained in:
@@ -244,25 +244,6 @@ var GuacamoleUI = {
|
|||||||
// Detect long-press at bottom of screen
|
// Detect long-press at bottom of screen
|
||||||
document.body.addEventListener('touchstart', GuacamoleUI.startLongPressDetect, true);
|
document.body.addEventListener('touchstart', GuacamoleUI.startLongPressDetect, true);
|
||||||
|
|
||||||
// Show menu if mouse leaves document
|
|
||||||
document.addEventListener('mouseout', function(e) {
|
|
||||||
|
|
||||||
// Get parent of the element the mouse pointer is leaving
|
|
||||||
if (!e) e = window.event;
|
|
||||||
var target = e.relatedTarget || e.toElement;
|
|
||||||
|
|
||||||
// Ensure target is not document nor child of document
|
|
||||||
var targetParent = target;
|
|
||||||
while (targetParent != null) {
|
|
||||||
if (targetParent == document) return;
|
|
||||||
targetParent = targetParent.parentNode;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Start detection of intent to open menu
|
|
||||||
GuacamoleUI.startMenuOpenDetect();
|
|
||||||
|
|
||||||
}, true);
|
|
||||||
|
|
||||||
// Reconnect button
|
// Reconnect button
|
||||||
GuacamoleUI.buttons.reconnect.onclick = function() {
|
GuacamoleUI.buttons.reconnect.onclick = function() {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
|
Reference in New Issue
Block a user