diff --git a/app/views/alchemy/admin/elements/create.js.erb b/app/views/alchemy/admin/elements/create.js.erb index 6db4f595ad..83088b279c 100644 --- a/app/views/alchemy/admin/elements/create.js.erb +++ b/app/views/alchemy/admin/elements/create.js.erb @@ -36,7 +36,7 @@ Alchemy.closeCurrentDialog(); Alchemy.Tinymce.init(<%= @element.richtext_contents_ids.to_json %>); Alchemy.PreviewWindow.refresh(function() { - Alchemy.ElementEditors.selectElementInPreview(<%= @element.id %>); + Alchemy.ElementEditors.focusElementPreview(<%= @element.id %>); }); $el = $('#element_<%= @element.id %>'); diff --git a/app/views/alchemy/admin/elements/update.js.erb b/app/views/alchemy/admin/elements/update.js.erb index 25a570b88f..8b4f9c7c17 100644 --- a/app/views/alchemy/admin/elements/update.js.erb +++ b/app/views/alchemy/admin/elements/update.js.erb @@ -9,7 +9,7 @@ $el.trigger('SaveElement.Alchemy', {previewText: '<%= j sanitize(@element.preview_text) %>'}); Alchemy.growl('<%= Alchemy.t(:element_saved) %>'); Alchemy.PreviewWindow.refresh(function() { - Alchemy.ElementEditors.selectElementInPreview(<%= @element.id %>); + Alchemy.ElementEditors.focusElementPreview(<%= @element.id %>); }); <%- else -%>