mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-18 18:39:55 +00:00
Merge pull request #1613 from ckaczor/issue-1494
Issue #1494 - Fix middle click for closing tabs
This commit is contained in:
commit
5c2e8a1db1
@ -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…
x
Reference in New Issue
Block a user