Show context when no selection

Closes #162
This commit is contained in:
Nils Maier 2019-10-11 13:28:18 +02:00
parent c901438216
commit 6528e2118e
2 changed files with 2 additions and 4 deletions

View File

@ -45,10 +45,10 @@ export class TableEvents extends BaseTable {
"scroll", debounce(this.scrolled.bind(this), SCROLL_DEBOUNCE), { "scroll", debounce(this.scrolled.bind(this), SCROLL_DEBOUNCE), {
passive: true passive: true
}); });
body.addEventListener("contextmenu", this.contextmenu.bind(this), true);
table.addEventListener("keypress", this.keypressed.bind(this), true); table.addEventListener("keypress", this.keypressed.bind(this), true);
table.addEventListener("keydown", this.keypressed.bind(this), true); table.addEventListener("keydown", this.keypressed.bind(this), true);
table.addEventListener("contextmenu", this.contextmenu.bind(this), true);
selectionGrippy.addEventListener("click", this.grippyClicked.bind(this)); selectionGrippy.addEventListener("click", this.grippyClicked.bind(this));
} }

View File

@ -571,9 +571,7 @@ export class DownloadTable extends VirtualTable {
ctx.on("dismissed", () => this.table.focus()); ctx.on("dismissed", () => this.table.focus());
this.on("contextmenu", (tree, event) => { this.on("contextmenu", (tree, event) => {
if (!this.selection.empty) {
this.showContextMenu(event); this.showContextMenu(event);
}
return true; return true;
}); });