Skip to content

Commit

Permalink
Ignore rule based attributes on morph
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCornthwaiteKatalyst committed Jun 25, 2024
1 parent 72f0f27 commit 8d5326a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/components/katalyst/content/editor_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions app/javascript/content/editor/container_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 8d5326a

Please sign in to comment.