From be07f05eac70ba979163c9276e57b09fa8fe1210 Mon Sep 17 00:00:00 2001 From: Lorenz Padberg Date: Mon, 18 Mar 2024 14:23:42 +0100 Subject: [PATCH] Disable highlighting dialog on soulution texts --- client/src/helpers/highlight.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/helpers/highlight.ts b/client/src/helpers/highlight.ts index e2ce8d0e..4fd52a6d 100644 --- a/client/src/helpers/highlight.ts +++ b/client/src/helpers/highlight.ts @@ -175,6 +175,10 @@ export const getSelectionHandler = const selector = parentSelector ? parentSelector : 'content-component'; const contentComponent = findClosestAncestorWithClass(startContainer, selector); if (contentComponent) { + if (contentComponent.classList.contains('content-component--solution')) { + // Lorenz: I added this to prevent highlighting of the solution. It ain't pretty, but it works + return; + } // our selection is wholly inside the container node, we continue with it const position = findPositionInParent(contentComponent); const uuid = contentComponent.dataset.uuid || '';