diff --git a/app/components/katalyst/content/editor_component.rb b/app/components/katalyst/content/editor_component.rb index d2c1ae2..f08ca11 100644 --- a/app/components/katalyst/content/editor_component.rb +++ b/app/components/katalyst/content/editor_component.rb @@ -7,6 +7,7 @@ class EditorComponent < Editor::BaseComponent submit->#{CONTAINER_CONTROLLER}#reindex content:drop->#{CONTAINER_CONTROLLER}#drop content:reindex->#{CONTAINER_CONTROLLER}#reindex + turbo:before-morph-attribute->#{CONTAINER_CONTROLLER}#morph content:reset->#{CONTAINER_CONTROLLER}#reset ACTIONS diff --git a/app/javascript/content/editor/container_controller.js b/app/javascript/content/editor/container_controller.js index 20ea21c..cb89543 100644 --- a/app/javascript/content/editor/container_controller.js +++ b/app/javascript/content/editor/container_controller.js @@ -13,6 +13,13 @@ export default class ContainerController extends Controller { this.reindex(); } + morph(e) { + // Ignore morphing rule based attributes that are handled in JS + if(e.detail.attributeName.includes("data-deny")) { + e.preventDefault(); + } + } + get container() { return new Container(this.containerTarget); }