mirror of
https://github.com/wukko/cobalt.git
synced 2025-04-29 22:14:26 +02:00
web/Omnibox: don't rerender omnibox buttons
this prevents unnecessary listener creation on valid/invalid link spam
This commit is contained in:
parent
cc5dff0a30
commit
07d4393d27
@ -170,17 +170,13 @@
|
||||
disabled={isDisabled}
|
||||
/>
|
||||
|
||||
{#if clearVisible}
|
||||
<ClearButton click={() => ($link = "")} />
|
||||
{/if}
|
||||
{#if downloadable}
|
||||
<DownloadButton
|
||||
url={$link}
|
||||
bind:this={downloadButton}
|
||||
bind:disabled={isDisabled}
|
||||
bind:loading={isLoading}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div id="action-container">
|
||||
@ -239,6 +235,14 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
#input-container:not(.clear-visible) :global(#clear-button) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#input-container:not(.downloadable) :global(#download-button) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#input-container.clear-visible {
|
||||
padding-right: var(--input-padding);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user