Sie sind nicht angemeldet.


Donnerstag, 14. Juni 2018, 22:54

parent=stage focus issue?

Dear Klaus!
I just tried to create a plugin that is displayed alongside the panorama, instead of over the image, by setting the plugins parent to stage. It all looks good, but when I put an input element in this plugin, it's very hard to get focus in it, meaning if I just single-click it, nothing happens, no matter how many times I try. If I double click, again nothing happens. But if I start clicking like mad, sometimes it finally gets focus. Please note this only happens with type=text inputs, buttons work just fine.

I'm pretty sure this has something to do with the parent=stage setting, because if I remove that line and the plugin appears inside the area, this behavior stops immediately.

Is this a bug perhaps? Any workarounds?

Update: did some search on the forum and found out that there has been some similar issues, but the topics are dated back to 2011, and it was still in the flash-based viewer, so I guess that's a completely different animal. In any case I tried the setting parent=bglayer aswell, but the same issue persists, in fact it's even worse, this time I wasn't able to get the focus in the input at all, no matter how many times and how fast I tried to click *tongue*

Update2: looking around in the debugger it seems that there is some kind of internal krpano (mousedown) event listener preventing the textfield from getting the focus, when I remove that it starts working immediately.

Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »webseta« (14. Juni 2018, 23:17)


Dienstag, 19. Juni 2018, 17:13

Klaus, could you please take a look at this?


Donnerstag, 16. August 2018, 02:27

Hi, this is still an issue, pls reply if possible.


Mittwoch, 5. September 2018, 11:44


the krpano viewer manages the mouse and touch events for its elements by its own.

Otherwise controlling wouldn't work and to avoid that the page would be scrolled/dragged around when dragging a krpano element, the krpano event handling need to suppress/prevent the default event behavior of the browser on these elements.

It works as it should but can become problematic/conflicting when mixing it with other/external elements - e.g. input elements might depend on that their parent element would do the browsers default event processing. The next is using stage=parent - in this case krpano puts that element outside of the its own control element that handles/tracks the events, by that the event handling become even more complicated when combination with external stuff...

Maybe post your example (as reduced as possible), maybe it's possible to find a manual solution...

Best regards,


Freitag, 7. September 2018, 00:29

Open this link, close the black info layer that pops up, wait 3 seconds and then a layer will slide in from the left. At the top, there's an input field, this is the one I'm having trouble to get focus into. I appreciate what you wrote and how these things aren't easy, but it would be great if there was some kind of a workaround :)



Dienstag, 11. September 2018, 11:14


why even using parent=stage in this case?
When looking at the example I can't see a need for it...

Best regards,


Mittwoch, 26. September 2018, 15:10

What do you mean?

In the documentation it says:
"Note - all <layer> or <plugin> elements will be placed
inside this area. To place a <layer> or <plugin> element
outside that area, set the parent attribute of that layer / plugin element to "STAGE"."

I need the plugin to be outside the area.


Mittwoch, 26. September 2018, 15:14

Anyway, I was actually able to solve this by giving it focus programmatically on a click. Not a nice/ideal solution, but works for now.

One big issue is that this way I the care in the input can only be placed at the end of the text, so it's not possible to click into a specific position or to select the text inside it. Is there perhaps a workaround, or a fix planned for this?

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »webseta« (26. September 2018, 19:23)


Freitag, 28. September 2018, 01:33


I agree with webseta, placing a layer outisde the area using parent=stage is usefull but very unfortunately we lose control when doing this in Internet Explorer on that particular layer.

But this works fine in firefox/chrome, the mouse events are correctly passed

any way this could work the same with IE ?

this is so usefull....


Samstag, 29. September 2018, 03:12

Interesting rebaj, you're saying you don't experience the issue I'm having in Chrome? At all?


Sonntag, 30. September 2018, 16:28

On firefox/chrome, i lose mouse scroll events, but found a fix for that

on EDGE, i lose drag events, and that's annoying...


Montag, 1. Oktober 2018, 11:01

Looks it's only buggy on touch screens (i'm using surface studio)

Edge on a non touch screen works fine with parent=stage

on the surface, if you happen to touch a parent=stage, then it completely loses focus


Mittwoch, 24. Oktober 2018, 15:43

Oh yeah, I just realized that on mobile (android, chrome) it's not working at all, not just the text input fields but even buttons stop working.

Klaus, is there a workaround or a planned bugfix for this?