Disable highlighting dialog on soulution texts
This commit is contained in:
parent
a28c9e7edb
commit
be07f05eac
|
|
@ -175,6 +175,10 @@ export const getSelectionHandler =
|
||||||
const selector = parentSelector ? parentSelector : 'content-component';
|
const selector = parentSelector ? parentSelector : 'content-component';
|
||||||
const contentComponent = findClosestAncestorWithClass(startContainer, selector);
|
const contentComponent = findClosestAncestorWithClass(startContainer, selector);
|
||||||
if (contentComponent) {
|
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
|
// our selection is wholly inside the container node, we continue with it
|
||||||
const position = findPositionInParent(contentComponent);
|
const position = findPositionInParent(contentComponent);
|
||||||
const uuid = contentComponent.dataset.uuid || '';
|
const uuid = contentComponent.dataset.uuid || '';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue