I built a tree inside a DIV container. The container has it’s width and height set. Then I attach a context menu to that tree.
When I click on an item inside the tree, the context menu pops up right under the clicked item, everything’s fine.
But when I load the whole tree-page in an iFrame and the context menu pops up, it’s position is completely wrong. Sometimes it’s about 30px ABOVE the clicked item.
The context menu has native routines which tries to detect correct position, but in case of complex HTML layout it may fail.
You can try
a) disable positioning routines
b) if the shift always is the same you can set the correction manually
var context_menu = new dhtmlXContextMenuObject
Works fine now. Your code piece did it, thank you. And thanks for the quick response !