mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-09 03:20:21 +00:00
Fix leaked trix editor event listener [OFN-12744]
This commit is contained in:
@@ -2,9 +2,9 @@ import { Controller } from "stimulus";
|
||||
|
||||
export default class extends Controller {
|
||||
connect() {
|
||||
window.addEventListener("trix-change", this.#trixChange);
|
||||
this.element.addEventListener("trix-change", this.#trixChange);
|
||||
this.#trixInitialize();
|
||||
window.addEventListener("trix-initialize", this.#trixInitialize);
|
||||
this.element.addEventListener("trix-initialize", this.#trixInitialize);
|
||||
}
|
||||
|
||||
#trixChange = (event) => {
|
||||
|
||||
Reference in New Issue
Block a user