X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6b179c4e9bf08f3ceb8f354f4b231f0da7e7aa4b..99a7d21a9bc50cdb38559dd0a8b60bc60072b5a1:/app/assets/javascripts/richtext.js?ds=inline 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"); }); /*