Changeset 52e5aea in guacamole


Ignore:
Timestamp:
04/08/12 19:31:11 (14 months ago)
Author:
zhangmaike
Branches:
master, guacamole-debian-parent, rpm, unstable, unstable-websocket
Children:
3b27b94
Parents:
b98e445
git-author:
Michael Jumper <zhangmaike@…> (04/08/12 19:31:11)
git-committer:
Michael Jumper <zhangmaike@…> (04/08/12 19:31:11)
Message:

Automatically reposition event target on focus in case browser automatically centers input fields.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/webapp/scripts/interface.js

    rf49d460 r52e5aea  
    280280    GuacamoleUI.buttons.touchShowKeyboard.onclick =  
    281281        function(e) { 
     282 
     283            // Center event target in case browser automatically centers 
     284            // input fields on focus. 
     285            GuacamoleUI.eventTarget.style.left = 
     286                (window.pageXOffset + GuacamoleUI.viewport.offsetWidth / 2) + "px"; 
     287 
     288            GuacamoleUI.eventTarget.style.top = 
     289                (window.pageYOffset + GuacamoleUI.viewport.offsetHeight / 2) + "px"; 
     290 
    282291            GuacamoleUI.eventTarget.focus(); 
    283292            GuacamoleUI.hideTouchMenu(); 
Note: See TracChangeset for help on using the changeset viewer.