X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3ae313fd1dc8b811482668344cf2f863bbc97ecc..fb854652ea47d7b3fa1657722f1da768eaba4f25:/app/assets/javascripts/richtext.js?ds=sidebyside diff --git a/app/assets/javascripts/richtext.js b/app/assets/javascripts/richtext.js index 1576656ee..e069f6f88 100644 --- a/app/assets/javascripts/richtext.js +++ b/app/assets/javascripts/richtext.js @@ -8,6 +8,10 @@ $(document).ready(function () { var container = $(this).closest(".richtext_container"); container.find(".tab-pane[id$='_preview']").empty(); + }).on("invalid", function () { + var container = $(this).closest(".richtext_container"); + + container.find("button[data-bs-target$='_edit']").tab("show"); }); /*