mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-29 05:34:36 +00:00
make middle mouse button close tabs (fixes #92)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Component, Input, Output, EventEmitter, HostBinding } from '@angular/core'
|
||||
import { Component, Input, Output, EventEmitter, HostBinding, HostListener } from '@angular/core'
|
||||
import { BaseTabComponent } from '../components/baseTab.component'
|
||||
|
||||
@Component({
|
||||
@@ -12,4 +12,10 @@ export class TabHeaderComponent {
|
||||
@Input() @HostBinding('class.has-activity') hasActivity: boolean
|
||||
@Input() tab: BaseTabComponent
|
||||
@Output() closeClicked = new EventEmitter()
|
||||
|
||||
@HostListener('auxclick', ['$event']) onClick ($event: MouseEvent): void {
|
||||
if ($event.which == 2) {
|
||||
this.closeClicked.emit()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user