X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a0b612ad15218835c3d98b39cc0ef24a50ef47cf..69122afe78a411d17188a6b276c04d2f1739599b:/app/assets/javascripts/richtext.js diff --git a/app/assets/javascripts/richtext.js b/app/assets/javascripts/richtext.js index 259b914de..7da465d29 100644 --- a/app/assets/javascripts/richtext.js +++ b/app/assets/javascripts/richtext.js @@ -11,7 +11,7 @@ $(document).ready(function () { /* * Install a handler to switch to preview mode */ - $(".richtext_dopreview").on("show.bs.tab", function () { + $(".richtext_container button[data-bs-target$='_preview']").on("show.bs.tab", function () { var editor = $(this).parents(".richtext_container").find("textarea"); var preview = $(this).parents(".richtext_container").find(".richtext_preview"); var minHeight = editor.outerHeight() - preview.outerHeight() + preview.height();