Prevent triggering context menu item right after showing the context men...

As titled, this snippet code can prevent the issue.