Fix editor rendering on socket reconnection (#2765)

This commit is contained in:
Jonatan Kłosko 2024-08-29 18:03:43 +02:00 committed by GitHub
parent e7724d5356
commit 9b542baf71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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() {