diff --git a/assets/js/translation-form.js b/assets/js/translation-form.js index d755f3a..cba0c86 100644 --- a/assets/js/translation-form.js +++ b/assets/js/translation-form.js @@ -6,6 +6,8 @@ let TranslationFormHook = { this.tunit_editor = this.el.querySelector("#tunit-editor-content") this.save_edit_button = this.el.querySelector("#save-edit-button") this.save_publish_button = this.el.querySelector("#save-publish-button") + let article_preview_links = document.querySelectorAll(".article-preview a") + article_preview_links.forEach(el => el.addEventListener('click', e => e.preventDefault())) }, keyupHandler(e) { var push_event = true diff --git a/lib/outlook_web/live/translation_live/form_component.ex b/lib/outlook_web/live/translation_live/form_component.ex index 1b358ac..e1eeae8 100644 --- a/lib/outlook_web/live/translation_live/form_component.ex +++ b/lib/outlook_web/live/translation_live/form_component.ex @@ -51,7 +51,7 @@ defmodule OutlookWeb.TranslationLive.FormComponent do <.tunit_editor current_tunit={@current_tunit} target={@myself} /> -