Skip to content

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.

feat: Make canvas cursor style compatible across all browsers (#4727)

Ivan Starkovcbbf694c3837
diff --git a/apps/builder/app/canvas/shared/styles.ts b/apps/builder/app/canvas/shared/styles.ts
index 5f7bfb77be..6ac01ac403 100644
--- a/apps/builder/app/canvas/shared/styles.ts
+++ b/apps/builder/app/canvas/shared/styles.ts
@@ -156,15 +156,34 @@ const helperStyles = [
// When double clicking into an element to edit text, it should not select the word.
`[${idAttribute}] {
user-select: none;
+ /* Safari */
+ -webkit-user-select: none;
+ cursor: default;
}`,
+ `
+ [${idAttribute}][contenteditable] {
+ /* Safari */
+ cursor: initial;
+ }
+ `,
+
...helperStylesShared,
];
// Find all editable elements and set cursor text inside
const helperStylesContentEdit = [
`[${idAttribute}] {
- user-select: none;
-}`,
+ user-select: none;
+ /* Safari */
+ -webkit-user-select: none;
+ cursor: default;
+ }`,
+ `
+ [${idAttribute}][contenteditable] {
+ /* Safari */
+ cursor: initial;
+ }
+ `,
...helperStylesShared,
];