Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
better logic
Oleg Isonend5007343e5eb
diff --git a/apps/designer/app/designer/features/style-panel/shared/css-value-input/css-value-input.tsx b/apps/designer/app/designer/features/style-panel/shared/css-value-input/css-value-input.tsxindex 966b135482..38b3c36541 100644--- a/apps/designer/app/designer/features/style-panel/shared/css-value-input/css-value-input.tsx+++ b/apps/designer/app/designer/features/style-panel/shared/css-value-input/css-value-input.tsx@@ -130,13 +130,13 @@ const useScrub = (options: {}) => {const inputRef = useRef<HTMLInputElement | null>(null);const optionsRef = useRef(options);- const hasScrubbed = useRef(false);+ const shouldSelect = useRef(true);const handlePointerUp = () => {- if (hasScrubbed.current === false) {+ if (shouldSelect.current) {inputRef.current?.select();}- hasScrubbed.current = false;+ shouldSelect.current = true;};useEffect(() => {@@ -150,7 +150,7 @@ const useScrub = (options: {const scrub = numericScrubControl(inputRef.current, {initialValue: value.value,onValueInput(event) {- hasScrubbed.current = true;+ shouldSelect.current = false;onChange({...value,value: event.value,