I currently run into an issue that I have to click twice in order to show my customized html context menu. The html context menu is hosted under a div. So I just change div’s style, i.e. display, top, left.
I have read this post How to bring up HTML context menu immediately upon click, and my symptom is very similar to this one.
With a context menu opening, if clicking on some other point, only hideContextMenu will be called. I have to click again in order to trigger showContextMenu. However, if I keep clicking on the same position, the showContextMenu will be trigerred each single click.
Any idea? Thanks in advance.