fix chrome bug when changing input
This commit is contained in:
parent
1ff2e77ef5
commit
88f4aa920f
|
@ -11,6 +11,12 @@
|
||||||
removeNode(id);
|
removeNode(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resetNode() {
|
||||||
|
// hack to deselect node and apply changes on chrome
|
||||||
|
$nodes.find(n => n.id === id).selected = false;
|
||||||
|
$nodes = $nodes
|
||||||
|
}
|
||||||
|
|
||||||
function changeFile() {
|
function changeFile() {
|
||||||
const newFile = OUTPUTNAMES.find((n) => n.name === data.name);
|
const newFile = OUTPUTNAMES.find((n) => n.name === data.name);
|
||||||
data.inputs = [...newFile.inputs];
|
data.inputs = [...newFile.inputs];
|
||||||
|
@ -18,9 +24,7 @@
|
||||||
data.ext = newFile.ext;
|
data.ext = newFile.ext;
|
||||||
data = data;
|
data = data;
|
||||||
|
|
||||||
// hack to deselect node and apply changes on chrome
|
resetNode();
|
||||||
$nodes.find(n => n.id === id).selected = false;
|
|
||||||
$nodes = $nodes
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -33,7 +37,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
{#if data.nodeType == "input"}
|
{#if data.nodeType == "input"}
|
||||||
<select bind:value={data.name}>
|
<select bind:value={data.name} on:change={resetNode}>
|
||||||
{#each INPUTNAMES as inp}
|
{#each INPUTNAMES as inp}
|
||||||
<option value={inp.name}>{inp.name}</option>
|
<option value={inp.name}>{inp.name}</option>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
Loading…
Reference in New Issue