Skip to content

Commit 4205b1a

Browse files
committed
[frontend] middle click to destroy tab
1 parent 435659f commit 4205b1a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

frontend/src/tabs.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ export const DragTab: Component<{
3535
class="dragroot"
3636
style="position: unset;"
3737
on:click={() => this.click()}
38+
on:auxclick={(e) => {
39+
if (e.button === 1) {
40+
this.destroy();
41+
}
42+
}}
3843
>
3944
<div class={use(this.active).map((x) => `main ${x ? "active" : ""}`)}>
4045
<img src={use(this.icon)} />

0 commit comments

Comments
 (0)