fix(web): Prevent changing asset location triggering keyboard shortcuts (#21451)

fix(web): Prevent changing asset location triggering asset keyboard shortcuts
This commit is contained in:
Snowknight26 2025-08-30 13:39:25 -05:00 committed by GitHub
parent b3372064e0
commit 225af973c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 37 additions and 4 deletions

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { clamp } from 'lodash-es';
import type { ClipboardEventHandler } from 'svelte/elements';
import type { ClipboardEventHandler, KeyboardEventHandler } from 'svelte/elements';
interface Props {
id: string;
@ -11,6 +11,7 @@
value?: number;
onInput: (value: number | null) => void;
onPaste?: ClipboardEventHandler<HTMLInputElement>;
onKeyDown?: KeyboardEventHandler<HTMLInputElement>;
}
let {
@ -22,6 +23,7 @@
value = $bindable(),
onInput,
onPaste = undefined,
onKeyDown = undefined,
}: Props = $props();
const oninput = () => {
@ -48,4 +50,5 @@
bind:value
{oninput}
onpaste={onPaste}
onkeydown={onKeyDown}
/>