diff options
| author | Gubolin <gubolin@fantasymail.de> | 2014-09-07 09:12:00 +0200 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2014-09-07 09:12:00 +0200 |
| commit | d5363e2cf35d69215904b1c899e4cafd0f1c632f (patch) | |
| tree | cd0ebfc163daa508fea5e4ac7bea6f42aebcc4ab | |
| parent | 5bd357806fb0f3d0a9556dfb718f53bfb6af4fbb (diff) | |
| download | snap-d5363e2cf35d69215904b1c899e4cafd0f1c632f.tar.gz snap-d5363e2cf35d69215904b1c899e4cafd0f1c632f.zip | |
show virtual keyboard in Android (offline app only) (fix #81)
| -rwxr-xr-x | mobile.sh | 1 | ||||
| -rw-r--r-- | morphic.js | 5 | ||||
| -rwxr-xr-x | snap.html | 4 |
3 files changed, 10 insertions, 0 deletions
@@ -13,5 +13,6 @@ git clone https://github.com/Gubolin/snap.git www cd www git checkout mobileapp cordova platform add android +cordova plugin add org.apache.cordova.plugin.softkeyboard cordova plugin add org.apache.cordova.vibration cordova build android @@ -10778,6 +10778,11 @@ WorldMorph.prototype.edit = function (aStringOrTextMorph) { this.virtualKeyboard.style.top = this.cursor.top() + pos.y + "px"; this.virtualKeyboard.style.left = this.cursor.left() + pos.x + "px"; this.virtualKeyboard.focus(); + if (cordova) { + if (cordova.plugins.SoftKeyboard) { // Android only + cordova.plugins.SoftKeyboard.show(); // Issue #81 + } + } } if (MorphicPreferences.useSliderForInput) { @@ -18,6 +18,10 @@ <script type="text/javascript" src="locale.js"></script> <script type="text/javascript" src="cloud.js"></script> <script type="text/javascript" src="sha512.js"></script> + + <!-- packaged mobile app library --> + <script type="text/javascript" src="cordova.js"></script> + <script type="text/javascript"> var world; window.onload = function () { |
