Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/components/floating-menus/NodeCatalog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
</script>

<LayoutCol class="node-catalog">
<TextInput placeholder="Search Nodes…" value={searchTerm} on:value={({ detail }) => (searchTerm = detail)} bind:this={nodeSearchInput} />
<TextInput placeholder="Search Nodes…" value={searchTerm} on:value={({ detail }) => (searchTerm = detail)} selectAllOnFocus={false} bind:this={nodeSearchInput} />
<div class="list-results" on:wheel|passive|stopPropagation>
{#each nodeCategories as nodeCategory}
<details open={nodeCategory[1].open}>
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/components/widgets/inputs/TextInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
// Sizing
export let minWidth = 0;
export let maxWidth = 0;
// Tooltips
// Tooltips

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format the file

export let tooltipLabel: string | undefined = undefined;
export let tooltipDescription: string | undefined = undefined;
export let tooltipShortcut: ActionShortcut | undefined = undefined;
// Behavior
export let selectAllOnFocus = true;

let className = "";
export { className as class };
Expand All @@ -28,10 +30,10 @@
let self: FieldInput | undefined;
let editing = false;

function onTextFocused() {
function onTextFocused() {
editing = true;

self?.selectAllText(value);
if (selectAllOnFocus) self?.selectAllText(value);
}

// Called only when `value` is changed from the <input> element via user input and committed, either with the
Expand Down