X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/735a5cf9e25b81d03db80ca4393aa34ea74d612a..80c43f51c2bd97f0bf92026fbb273615e8f9f015:/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"); }); /*