mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
Automatically reposition event target on scroll.
This commit is contained in:
@@ -447,6 +447,12 @@ var GuacamoleUI = {
|
|||||||
GuacamoleUI.eventTarget.setAttribute("autocorrect", "off");
|
GuacamoleUI.eventTarget.setAttribute("autocorrect", "off");
|
||||||
GuacamoleUI.eventTarget.setAttribute("autocapitalize", "off");
|
GuacamoleUI.eventTarget.setAttribute("autocapitalize", "off");
|
||||||
|
|
||||||
|
// Automatically reposition event target on scroll
|
||||||
|
window.addEventListener("scroll", function() {
|
||||||
|
GuacamoleUI.eventTarget.style.left = window.pageXOffset + "px";
|
||||||
|
GuacamoleUI.eventTarget.style.top = window.pageYOffset + "px";
|
||||||
|
});
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
||||||
// Tie UI events / behavior to a specific Guacamole client
|
// Tie UI events / behavior to a specific Guacamole client
|
||||||
|
@@ -245,15 +245,16 @@ div#viewportClone {
|
|||||||
/* Keyboard event target */
|
/* Keyboard event target */
|
||||||
|
|
||||||
textarea#eventTarget {
|
textarea#eventTarget {
|
||||||
position: fixed;
|
position: absolute;
|
||||||
|
|
||||||
/* Hide offscreen */
|
/* Hide offscreen */
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 0;
|
width: 10px;
|
||||||
height: 0;
|
height: 10px;
|
||||||
opacity: 0;
|
opacity: 1;
|
||||||
|
|
||||||
|
z-index: 100;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user