From f181ab4f754d443f56f39cea17a1b29554ab6027 Mon Sep 17 00:00:00 2001 From: Claude Fable 5 Date: Sat, 22 Aug 2026 10:02:15 +0200 Subject: [PATCH] Mount rich-text editor outside the label to stop label clicks triggering the bold button Co-Authored-By: Claude Fable 5 --- public/css/survey-frontend.css | 8 ++++++++ public/js/survey-rich-text.js | 11 ++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/public/css/survey-frontend.css b/public/css/survey-frontend.css index 8dae382..6a2e782 100644 --- a/public/css/survey-frontend.css +++ b/public/css/survey-frontend.css @@ -1358,3 +1358,11 @@ font-weight: 400; font-style: normal; } + +.survey-label--rich-text { + margin-bottom: -0.35rem; +} + +.survey-label--rich-text + .survey-rich-editor { + margin-bottom: 0.4rem; +} diff --git a/public/js/survey-rich-text.js b/public/js/survey-rich-text.js index 7852167..782d09c 100644 --- a/public/js/survey-rich-text.js +++ b/public/js/survey-rich-text.js @@ -35,7 +35,16 @@ editorHost.className = 'survey-rich-editor__host'; wrapper.appendChild(editorHost); - textarea.parentNode.insertBefore(wrapper, textarea); + // Nicht innerhalb eines