mirror of
https://github.com/Eugeny/tabby
synced 2024-12-14 15:22:40 +00:00
make middle mouse button close tabs (fixes #92)
This commit is contained in:
parent
42007f4fef
commit
29a6fb60de
1 changed files with 7 additions and 1 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue