Disable highlighting dialog on soulution texts

This commit is contained in:
Lorenz Padberg 2024-03-18 14:23:42 +01:00
parent a28c9e7edb
commit be07f05eac
1 changed files with 4 additions and 0 deletions

View File

@ -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 || '';