Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
var krpanoplugin = function() { var local = this; var krpano = null; var plugin = null; var inputelement = null; local.registerplugin = function(krpanointerface, pluginpath, pluginobject) { krpano = krpanointerface; plugin = pluginobject; inputelement = document.createElement("input"); inputelement.type = "text"; inputelement.style.width = "100%"; inputelement.style.height = "100%"; plugin.registerattribute("text", "", text_set, text_get); plugin.registerattribute("onchanged", null); inputelement.addEventListener("change", text_changed, true); plugin.sprite.appendChild(inputelement); } local.unloadplugin = function() { plugin = null; krpano = null; } function text_set(newtext) { inputelement.value = newtext; } function text_get() { return inputelement.value; } function text_changed() { krpano.call(plugin.onchanged, plugin); } }; |
What exactly do you mean with 'more than press'?you have more than "press" on Screen to get the focus of the textfield...or is that normal?
Yes, that example is just very basic, the requirement of several tweaks for mobile browsers is not very uncommon. It seems that touching the pano does't automatically change the focus (I don't know why yet), so it might necessary to do that manually.The other problem is that on desktop the tf looses the focus if I click on the screen, with the touchdevices the focus will always be on the tf, even when I click on the pano...means that the keyboard will always be shown, if I look around in the pano...
With "press" I mean you have to touch the tf more than two seconds...but perhaps that`s normal...???
Quoted
What exactly do you mean with 'more than press'?
I have no Android device with me yet, but on iOS just one touch into the input field is necessary...
ok, I was wondering if perhaps an internal Function in your player keeps the focus or something like that...
Quoted
Yes, that example is just very basic, the requirement of several tweaks
for mobile browsers is not very uncommon. It seems that touching the
pano does't automatically change the focus (I don't know why yet), so it
might necessary to do that manually.
Hi KlausI will look into that focus issue and post an updated example (but probably not before next week).
![]() |
Source code |
1 |
plugin.sprite.appendChild(inputelement); |
![]() |
Source code |
1 |
document.getElementsByTagName('body')[0].appendChild(element); |
Klaus, did you manage to look into this problem and why krpano doesn't allow the html5 input to lose focus when touching away from the input?Yes, that example is just very basic, the requirement of several tweaks for mobile browsers is not very uncommon. It seems that touching the pano does't automatically change the focus (I don't know why yet), so it might necessary to do that manually.
I will look into that focus issue and post an updated example (but probably not before next week).
Dear Klaus,That topic is still on my list, but I don't know yet where there will be time for it.