"menuControl" : document.getElementById("menuControl"),
"touchMenu" : document.getElementById("touchMenu"),
"logo" : document.getElementById("status-logo"),
+ "eventTarget" : document.getElementById("eventTarget"),
"buttons": {
};
+ var assumeNativeOSK = false;
+
// Show/Hide keyboard
var keyboardResizeInterval = null;
GuacamoleUI.buttons.showKeyboard.onclick = function() {
+ // If we think the platform has a native OSK, use the event target to
+ // cause it to display.
+ if (assumeNativeOSK) {
+ GuacamoleUI.eventTarget.focus();
+ return;
+ }
+
var displayed = GuacamoleUI.containers.keyboard.style.display;
if (displayed != "block") {
GuacamoleUI.containers.keyboard.style.display = "block";
menuShowLongPressTimeout = window.setTimeout(function() {
menuShowLongPressTimeout = null;
+
+ // Assume native OSK if menu shown via long-press
+ assumeNativeOSK = true;
GuacamoleUI.showMenu();
}, 800);
menuShowLongPressTimeout = null;
};
+ // Ensure the event target ALWAYS has text inside.
+ GuacamoleUI.eventTarget.onchange = function() {
+ GuacamoleUI.eventTarget.value = "x";
+ };
+
// Detect long-press at bottom of screen
document.body.addEventListener('touchstart', GuacamoleUI.startLongPressDetect, true);