From 9b542baf71fab4d4fff46706a01a9108ceb7f8db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Thu, 29 Aug 2024 18:03:43 +0200 Subject: [PATCH] Fix editor rendering on socket reconnection (#2765) --- assets/js/hooks/cell_editor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/js/hooks/cell_editor.js b/assets/js/hooks/cell_editor.js index 4e0355570..b491eb6ac 100644 --- a/assets/js/hooks/cell_editor.js +++ b/assets/js/hooks/cell_editor.js @@ -87,6 +87,9 @@ const CellEditor = { // to clean up and mount a fresh hook, which we force by ensuring // the DOM id doesn't match this.el.removeAttribute("id"); + // The container element has phx-update="ignore", so we want to + // make sure it is also replaced + this.el.querySelector(`[data-el-editor-container]`).removeAttribute("id"); }, destroyed() {