mirror of
https://github.com/Eugeny/tabby
synced 2024-11-15 17:28:06 +00:00
Fix middle click for closing tabs
This commit is contained in:
parent
4bf67b0904
commit
3aa4c6105b
1 changed files with 10 additions and 1 deletions
|
@ -78,10 +78,19 @@ export class TabHeaderComponent {
|
|||
this.showRenameTabModal()
|
||||
}
|
||||
|
||||
@HostListener('auxclick', ['$event']) async onAuxClick ($event: MouseEvent) {
|
||||
@HostListener('mousedown', ['$event']) async onMouseDown ($event: MouseEvent) {
|
||||
if ($event.which === 2) {
|
||||
$event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
@HostListener('mouseup', ['$event']) async onMouseUp ($event: MouseEvent) {
|
||||
if ($event.which === 2) {
|
||||
this.app.closeTab(this.tab, true)
|
||||
}
|
||||
}
|
||||
|
||||
@HostListener('auxclick', ['$event']) async onAuxClick ($event: MouseEvent) {
|
||||
if ($event.which === 3) {
|
||||
$event.preventDefault()
|
||||
|
||||
|
|
Loading…
Reference in a new issue