From 4792134990347f19df56a9f6a66519af3225bd67 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Fri, 17 Mar 2023 15:15:39 -0500 Subject: [PATCH] Add a bit delay to avoid race --- django_ace/static/django_ace/widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_ace/static/django_ace/widget.js b/django_ace/static/django_ace/widget.js index 8980ed7..d5226dd 100644 --- a/django_ace/static/django_ace/widget.js +++ b/django_ace/static/django_ace/widget.js @@ -162,7 +162,7 @@ ]); window[widget.id] = editor; - $(widget).trigger('ace_load', [editor]); + setTimeout(() => $(widget).trigger('ace_load', [editor]), 100); } function init() {