Fixing iOS clipping, keyboard issues.
- Make sure that on iOS the clipping setting is always forced to be enabled. - Hide the showKeyboard button unless connected. - Use the URL text entry method and disable autocorrect and autocapitalize in the show keyboard input box.
This commit is contained in:
parent
c506a48154
commit
a7db50597c
|
@ -73,7 +73,7 @@ load: function() {
|
||||||
UI.setMouseButton();
|
UI.setMouseButton();
|
||||||
// Remove the address bar
|
// Remove the address bar
|
||||||
setTimeout(function() { window.scrollTo(0, 1); }, 100);
|
setTimeout(function() { window.scrollTo(0, 1); }, 100);
|
||||||
UI.initSetting('clip', true);
|
UI.forceSetting('clip', true);
|
||||||
$D('noVNC_clip').disabled = true;
|
$D('noVNC_clip').disabled = true;
|
||||||
} else {
|
} else {
|
||||||
UI.initSetting('clip', false);
|
UI.initSetting('clip', false);
|
||||||
|
@ -177,6 +177,12 @@ initSetting: function(name, defVal) {
|
||||||
return val;
|
return val;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Force a setting to be a certain value
|
||||||
|
forceSetting: function(name, val) {
|
||||||
|
UI.updateSetting(name, val);
|
||||||
|
return val;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
// Show the clipboard panel
|
// Show the clipboard panel
|
||||||
toggleClipboardPanel: function() {
|
toggleClipboardPanel: function() {
|
||||||
|
@ -392,9 +398,11 @@ updateVisualState: function() {
|
||||||
if (connected) {
|
if (connected) {
|
||||||
UI.setViewClip();
|
UI.setViewClip();
|
||||||
UI.setMouseButton(1);
|
UI.setMouseButton(1);
|
||||||
|
$D('showKeyboard').style.display = "inline";
|
||||||
$D('sendCtrlAltDelButton').style.display = "inline";
|
$D('sendCtrlAltDelButton').style.display = "inline";
|
||||||
} else {
|
} else {
|
||||||
UI.setMouseButton();
|
UI.setMouseButton();
|
||||||
|
$D('showKeyboard').style.display = "none";
|
||||||
$D('sendCtrlAltDelButton').style.display = "none";
|
$D('sendCtrlAltDelButton').style.display = "none";
|
||||||
}
|
}
|
||||||
// State change disables viewport dragging.
|
// State change disables viewport dragging.
|
||||||
|
@ -495,8 +503,8 @@ setViewClip: function(clip) {
|
||||||
|
|
||||||
cur_clip = display.get_viewport();
|
cur_clip = display.get_viewport();
|
||||||
|
|
||||||
if (typeof(clip) !== 'undefined') {
|
if (typeof(clip) !== 'boolean') {
|
||||||
// Nothing
|
// Use current setting
|
||||||
clip = UI.getSetting('clip');
|
clip = UI.getSetting('clip');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
3
vnc.html
3
vnc.html
|
@ -70,7 +70,8 @@
|
||||||
id="showKeyboard" class="noVNC_status_button"
|
id="showKeyboard" class="noVNC_status_button"
|
||||||
value="Keyboard" title="Show Keyboard"
|
value="Keyboard" title="Show Keyboard"
|
||||||
onclick="UI.showKeyboard()"/>
|
onclick="UI.showKeyboard()"/>
|
||||||
<input type="text"
|
<input type="url"
|
||||||
|
autocapitalize="off" autocorrect="off"
|
||||||
id="keyboardinput" class="noVNC_status_button"
|
id="keyboardinput" class="noVNC_status_button"
|
||||||
onKeyDown="onKeyDown(event);"/>
|
onKeyDown="onKeyDown(event);"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue