From d9f800b9db94aab0ff6d4695092eb0048b63f470 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Wed, 10 Apr 2024 16:51:03 +0200 Subject: [PATCH] Reload preview window (again) after element create This has been removed during refactoring the element editor into a custom web-component in https://github.com/AlchemyCMS/alchemy_cms/pull/2614 This restores the behavior. --- app/views/alchemy/admin/elements/create.js.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/alchemy/admin/elements/create.js.erb b/app/views/alchemy/admin/elements/create.js.erb index 1f00fa1cff..00813e861a 100644 --- a/app/views/alchemy/admin/elements/create.js.erb +++ b/app/views/alchemy/admin/elements/create.js.erb @@ -26,6 +26,7 @@ Alchemy.growl('<%= Alchemy.t(:successfully_added_element) %>'); Alchemy.closeCurrentDialog(); + Alchemy.reloadPreview(); el = document.querySelector('#element_<%= @element.id %>'); el.focusElement();