Join the Webstudio community

Updated 9 months ago

Publish failed on element with property of type "on:click.prevent.stop"

At a glance

The community member is experiencing an issue where an element with the property "on:click.prevent.stop" works fine on the "Canvas" but fails to publish the webpage. The comments suggest that this is a bug in JSX, and there is a workaround available. However, using AlpineJS on WebStudio elements may lead to issues as WebStudio is rendering with React, and AlpineJS may modify the DOM and cause problems. The comments also mention that simple stuff that doesn't change the DOM controlled by React may work, but the dot in the attribute name is invalid, and the framework being used is not supported by WebStudio, so this issue is a "no-go".

Useful resources
I found the following problem, in the "Settings Panel" when trying to create element with a property of type "on:click.prevent.stop", it works fine on the "Canvas", but when trying to publish the webpage, the "Publish failed" icon appears.

Why does this happen and is it possible to correct it?
O
6 comments
noted, forwarding
follow this issue, its a bug in JSX, but there is a workaround https://github.com/webstudio-is/webstudio/issues/3573
On the related note: using alpinejs on webstudio elements will inevitably lead to issues, we are rendering with react, alpine may modify the dom and lead to all kinds of issues
if you do this on html embed elements react doesn't touch, its gonna be fine
simple stuff may work that doesn't change the dom controlled by react
turns out dot is invalid in attribute name, the framework you are using is using invalid stuff and we don't support that particular framework either, I am afraid this is a nogo
Add a reply
Sign up and join the conversation on Discord