Issue showing context menu attached to the window


#1

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.


#2

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?


#3

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.


#4

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


#5

Yes you are right. Thanks you very much.