web/Omnibox: ignore keyboard shortcuts when processing
This commit is contained in:
parent
d31090c3d5
commit
504dfdb995
2 changed files with 5 additions and 2 deletions
|
@ -28,6 +28,8 @@
|
|||
let linkInput: HTMLInputElement | undefined;
|
||||
let isFocused = false;
|
||||
|
||||
let isDisabled: boolean = false;
|
||||
|
||||
let downloadButton: SvelteComponent;
|
||||
|
||||
const validLink = (link: string) => {
|
||||
|
@ -67,7 +69,7 @@
|
|||
};
|
||||
|
||||
const handleKeydown = (e: KeyboardEvent) => {
|
||||
if (!linkInput || $dialogs.length > 0) {
|
||||
if (!linkInput || $dialogs.length > 0 || isDisabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -136,7 +138,7 @@
|
|||
<ClearButton click={() => (link = "")} />
|
||||
{/if}
|
||||
{#if validLink(link)}
|
||||
<DownloadButton url={link} bind:this={downloadButton} />
|
||||
<DownloadButton url={link} bind:this={downloadButton} bind:isDisabled={isDisabled} />
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
import type { DialogInfo } from "$lib/types/dialog";
|
||||
|
||||
export let url: string;
|
||||
export let isDisabled = false;
|
||||
|
||||
$: buttonText = ">>";
|
||||
$: buttonAltText = $t('a11y.save.download');
|
||||
|
|
Loading…
Reference in a new issue