{#each tabLabels as tabLabel, tabIndex (tabIndex)} { e.stopPropagation(); clickAction?.(tabIndex); }} on:auxclick={(e) => { // Middle mouse button click if (e.button === 1) { e.stopPropagation(); closeAction?.(tabIndex); } }} on:mouseup={(e) => { // Fallback for Safari: // https://developer.mozilla.org/en-US/docs/Web/API/Element/auxclick_event#browser_compatibility // The downside of using mouseup is that the mousedown didn't have to originate in the same element. // A possible future improvement could save the target element during mousedown and check if it's the same here. if (!isEventSupported("auxclick") && e.button === 1) { e.stopPropagation(); closeAction?.(tabIndex); } }} bind:this={tabElements[tabIndex]} > {tabLabel.name} {#if tabCloseButtons} { e?.stopPropagation(); closeAction?.(tabIndex); }} icon="CloseX" size={16} /> {/if} {/each} Panel Options Coming soon {#if panelType} {:else}
newDocument()} />
openDocument()} />
{/if}