Svelte bug fixes and code cleanup (#1074)

* Fix middle click tab close

* Fix swapping colors in the ColorPicker

* Cleanup

* Fix field inputs

* Fix tab key-based navigation

* Fix ColorPicker reseting Initial color when opened

* Prevent backend fighting with user dragging NumberInput

* Remaining fixes and comment cleanup
This commit is contained in:
Keavon Chambers
2023-03-10 03:47:06 -08:00
committed by GitHub
parent baf6dfbd32
commit 3370a0a33d
26 changed files with 220 additions and 179 deletions
@@ -67,8 +67,11 @@
$: sliderStepValue = isInteger ? (step === undefined ? 1 : step) : "any";
$: watchValue(value);
// Called only when `value` is changed from outside this component (with v-model)
// Called only when `value` is changed from outside this component
function watchValue(value: number | undefined) {
// Don't update if the slider is currently being dragged (we don't want the backend fighting with the user's drag)
if (rangeSliderClickDragState === "dragging") return;
// Draw a dash if the value is undefined
if (value === undefined) {
text = "-";