Skip to content

Commit

Permalink
Update: Add data-never-block to the script tag if Sandstorm.CookiePun…
Browse files Browse the repository at this point in the history
…ch is installed
  • Loading branch information
jonnitto authored Apr 20, 2022
1 parent a021787 commit 8eb68ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Resources/Private/Fusion/Editable/Editable.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ prototype(Carbon.BackendDocument:Editable) < prototype(Neos.Fusion:Component) {
id = ${this.property + this.node.identifier + Math.randomInt(0, 10000)}
nativeEditor = ${this.type == 'block' || this.type == 'inline'}
inBackend = ${this.node.context.inBackend}
// https://github.com/sandstorm/Sandstorm.CookiePunch is installed
sandstormCookiePunchIsInstalled = ${Configuration.setting('Neos.Neos.fusion.autoInclude')['Sandstorm.CookiePunch']}
dataNeverBlock = ${!!this.sandstormCookiePunchIsInstalled}

@if.hasNodeAndPropertyAndType = ${this.node && this.property && Type.isString(this.type)}

Expand All @@ -77,7 +80,7 @@ prototype(Carbon.BackendDocument:Editable) < prototype(Neos.Fusion:Component) {
data-slipstream
href={StaticResource.uri('Carbon.BackendDocument', 'Public/Editable.css')}
/>
<script src={StaticResource.uri('Carbon.BackendDocument', 'Public/Editable.js')} data-slipstream defer></script>
<script src={StaticResource.uri('Carbon.BackendDocument', 'Public/Editable.js')} data-slipstream defer data-never-block={props.dataNeverBlock}></script>
<label
@if.set={props.label && !props.nativeEditor}
class='carbon-backenddocument-editable__label'
Expand Down

0 comments on commit 8eb68ad

Please sign in to comment.