Skip to content

Instantly share code, notes, and snippets.

@Sebobo
Last active August 29, 2015 14:22
Show Gist options
  • Save Sebobo/f48487e324384a74f437 to your computer and use it in GitHub Desktop.
Save Sebobo/f48487e324384a74f437 to your computer and use it in GitHub Desktop.
Inline editable bootstrap buttons with Neos
.neos-backend .btn {
user-select: initial;
-moz-user-select: initial;
-ms-user-select: initial;
}
<f:if condition="{node.context.workspace.name} != 'live'">
<f:then>
<a class="{buttonType}">
<f:if condition="{buttonIcon}"><i class="{buttonIcon}"></i></f:if>
<neos:contentElement.editable property="buttonLabel" tag="span" />
</a>
</f:then>
<f:else>
<f:if condition="{buttonLabel}">
<neos:link.node class="{buttonType}" node="{buttonLink}">
<f:if condition="{buttonIcon}"><i class="{buttonIcon}"></i></f:if> {buttonLabel}
</neos:link.node>
</f:if>
</f:else>
</f:if>
@Sebobo
Copy link
Author

Sebobo commented Jun 11, 2015

The user-select set by Bootstrap causes problems in Firefox when trying to edit the buttons label in the backend.
This change makes it work fine again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment