fix(files): change file tab bar from nested buttons to div with role=tab
This commit is contained in:
parent
a111ba0b9d
commit
e2a406a167
1 changed files with 4 additions and 2 deletions
|
|
@ -270,16 +270,18 @@
|
||||||
{#if fileTabs.length > 0}
|
{#if fileTabs.length > 0}
|
||||||
<div class="file-tab-bar">
|
<div class="file-tab-bar">
|
||||||
{#each fileTabs as tab (tab.path)}
|
{#each fileTabs as tab (tab.path)}
|
||||||
<button
|
<div
|
||||||
class="file-tab"
|
class="file-tab"
|
||||||
class:active={activeTabPath === tab.path}
|
class:active={activeTabPath === tab.path}
|
||||||
class:preview={!tab.pinned}
|
class:preview={!tab.pinned}
|
||||||
onclick={() => activeTabPath = tab.path}
|
onclick={() => activeTabPath = tab.path}
|
||||||
ondblclick={() => { tab.pinned = true; }}
|
ondblclick={() => { tab.pinned = true; }}
|
||||||
|
role="tab"
|
||||||
|
tabindex="0"
|
||||||
>
|
>
|
||||||
<span class="file-tab-name" class:italic={!tab.pinned}>{tab.name}</span>
|
<span class="file-tab-name" class:italic={!tab.pinned}>{tab.name}</span>
|
||||||
<button class="file-tab-close" onclick={(e) => { e.stopPropagation(); closeTab(tab.path); }}>×</button>
|
<button class="file-tab-close" onclick={(e) => { e.stopPropagation(); closeTab(tab.path); }}>×</button>
|
||||||
</button>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue