update(table): The right-click menu will not be displayed when it is not activated

This commit is contained in:
yanmao 2021-12-27 22:17:41 +08:00
parent 1862e453fa
commit 606fa7bae2
1 changed files with 1 additions and 1 deletions

View File

@ -358,7 +358,7 @@ class ControllBar extends EventEmitter2 implements ControllBarInterface {
onTableMouseDown(event: MouseEvent) {
if (!event.target) return;
const td = $(event.target).closest('td');
if (td.length > 0 && event.button === 2) {
if (td.length > 0 && event.button === 2 && this.table.activated) {
this.showContextMenu(event);
} else {
this.hideContextMenu();