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
set readonly on inputs to avoid typing in editing mode and be able to delete the element with backspace #5
Oleg Isonened3fed18e681
diff --git a/app/canvas/wrapper-component/wrapper-component.tsx b/app/canvas/wrapper-component/wrapper-component.tsxindex 9ccbb67ec5..abc62feb5c 100644--- a/app/canvas/wrapper-component/wrapper-component.tsx+++ b/app/canvas/wrapper-component/wrapper-component.tsx@@ -57,6 +57,7 @@ export const WrapperComponentDev = ({);const userProps = useUserProps(id);+ const readonly = component === "Input" ? { readOnly: true } : undefined;const { Component } = primitives[component];return (@@ -67,6 +68,7 @@ export const WrapperComponentDev = ({{...rest}{...contentEditableProps}{...draggableProps}+ {...readonly}className={className}id={id}tabIndex={0}@@ -79,11 +81,6 @@ export const WrapperComponentDev = ({event.preventDefault();}}}- onMouseDown={(event: MouseEvent) => {- if (component === "Input") {- event.preventDefault();- }- }}onSubmit={(event: FormEvent) => {// Prevent submitting the form when clicking a button type submitevent.preventDefault();