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}
|
disabled={isDisabled}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{#if clearVisible}
|
<ClearButton click={() => ($link = "")} />
|
||||||
<ClearButton click={() => ($link = "")} />
|
<DownloadButton
|
||||||
{/if}
|
url={$link}
|
||||||
{#if downloadable}
|
bind:this={downloadButton}
|
||||||
<DownloadButton
|
bind:disabled={isDisabled}
|
||||||
url={$link}
|
bind:loading={isLoading}
|
||||||
bind:this={downloadButton}
|
/>
|
||||||
bind:disabled={isDisabled}
|
|
||||||
bind:loading={isLoading}
|
|
||||||
/>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="action-container">
|
<div id="action-container">
|
||||||
@ -239,6 +235,14 @@
|
|||||||
flex: 1;
|
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 {
|
#input-container.clear-visible {
|
||||||
padding-right: var(--input-padding);
|
padding-right: var(--input-padding);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user