From 69122afe78a411d17188a6b276c04d2f1739599b Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Thu, 8 Aug 2024 03:16:50 +0300 Subject: [PATCH] Remove .richtext_dopreview css class --- app/assets/javascripts/richtext.js | 2 +- app/views/shared/_richtext_field.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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(); diff --git a/app/views/shared/_richtext_field.html.erb b/app/views/shared/_richtext_field.html.erb index 238175762..9934ef63b 100644 --- a/app/views/shared/_richtext_field.html.erb +++ b/app/views/shared/_richtext_field.html.erb @@ -5,7 +5,7 @@
-- 2.39.5