Issue showing context menu attached to the window

If, a context menu is attached to a dhx window, it shows under the window at the first time. And will be showed upon the window after the second right click. V7.1.7 says “Fix the issue with showing of the context menu which is attached to the window”, but this issue is still there.

Hello,

Can you reproduce the issue in this snippet https://snippet.dhtmlx.com/kdk0md8t ?
It’s the demo attached to a bug you referring to, and here the issue appears fixed.
Probably there is another use case that we’ve missed, can you please clarify or modify the code of this snippet so the issue would be reproducible there?

HI, I made a contexmenu in a strange way :smiley: . The snippet is https://snippet.dhtmlx.com/noneit3o. You will not see the context menu when you first pop the window and right click upon a grid cell. Pls move the window and you’ll find it :smiley: . And the menu will show upon the window after you move the mouse over it.

I think the issue is that you’re creating the context menu before you’re showing the window, so it’s being initially created with a lower z-index value.

I tweaked your snippet and moved the code to create the context menu into the right-click event, and the context menu now appears correctly on the first right-click. See my modified snippet here: https://snippet.dhtmlx.com/8qdssowg

Yes you are right. Thanks you very much.