JavaScript does not work well within subwindows

Hi devs,
I’m using a AbstractJavaScriptComponent, which is a tree based on jstree.com (jQuery) inside a vaadin subwindow. The tree provides a contextmenu. I was facing the problem that that contextmenu was shown behind the vaadin subwindow alike descriped here
http://stackoverflow.com/questions/22273520/jstree-context-menu-popping-up-behind-tree-and-page-content
. I customized the z-index for the style of the contextmenu and now it is shown in front like it should be. The strange thing is, it also responds to mouseover events by highlighting the menu entries where the mouse is pointing to, but does not respond to onclick events. So the corresponding function is never triggered. In general the tree works fine in vaadin, though except inside of subwindows. Has anybody any experience with JavaScript and subwindows and maybe a approach how I could fix respectively debug this.

Thanks for your help
Josef