X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3ae313fd1dc8b811482668344cf2f863bbc97ecc..4a38ab5c80d325457a1928d049847d82532f620d:/app/assets/javascripts/richtext.js 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"); }); /*