Skip to content

Commit

Permalink
Only morph the turbo-frame contents, not the frame itself
Browse files Browse the repository at this point in the history
I had removed this in #d1935bd15c85e0a8776afccb90393fd378aea2d2 but we do
need innerHTML so that the outer frame don't get touched. The problem we had
is that we were nesting turbo-frames, so using .children to only address the
contents instead.
  • Loading branch information
jorgemanrubia committed Oct 26, 2023
1 parent 0e2081f commit 213be2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/drive/morph_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class MorphRenderer extends Renderer {
target: currentElement,
detail: { currentElement, newElement }
})
this.#morphElements(currentElement, newElement)
this.#morphElements(currentElement, newElement.children, "innerHTML")
}

#shouldRemoveElement = (node) => {
Expand Down

0 comments on commit 213be2f

Please sign in to comment.