diff --git a/packages/core/src/components/Dialog/Dialog.tsx b/packages/core/src/components/Dialog/Dialog.tsx index f928deeb75..894e6f9943 100644 --- a/packages/core/src/components/Dialog/Dialog.tsx +++ b/packages/core/src/components/Dialog/Dialog.tsx @@ -457,6 +457,13 @@ export default class Dialog extends PureComponent { } onContextMenu(e: React.MouseEvent) { + const isShown = this.isShown(); + if ( + (this.isShowTrigger(HideShowEvent.CONTEXT_MENU) && !isShown) || + (this.isHideTrigger(HideShowEvent.CONTEXT_MENU) && isShown) + ) { + e.preventDefault(); + } this.handleEvent(HideShowEvent.CONTEXT_MENU, e.target, e); }