You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having the following layout, where the not-annotatable block contains another not-annotatable element can lead to an incorrect selection ranges split!
<divclass="not-annotatable"><h3>Not annotatable block!</h3><p>
"See now, how men lay blame upon us gods for what is after all nothing but their own folly. Look at Aegisthus;
he must needs make love to Agamemnon's wife unrighteously and then kill Agamemnon, though he knew it would be
the <spanclass="not-annotatable">death of him; for I sent Mercury to warn him not</span> to do either of these things, inasmuch as Orestes would be
sure to take his revenge when he grew up and wanted to return home. Mercury told him this in all good will but
he would not listen, and now he has paid for everything in full."
</p></div>
Screen.Recording.2024-03-28.at.22.16.35.mov
Essentially it's caused by a bug in the splitAnnotatableRanges method that doesn't exclude any nested not-annotatable from splits execution on them.
Therefore, the annotation continues after the nested not-annotatable element, within the not-annotatable element 🤪
The effect is better expressed if I apply the #67 PR, where I removed usage of the redundant trimRange method:
Possible Solution
Update the splitAnnotatableRanges to prevent iterations over any nested not-annotatable elements and splitting the ranges on them
The text was updated successfully, but these errors were encountered:
Issue
Having the following layout, where the
not-annotatable
block contains anothernot-annotatable
element can lead to an incorrect selection ranges split!Screen.Recording.2024-03-28.at.22.16.35.mov
Essentially it's caused by a bug in the
splitAnnotatableRanges
method that doesn't exclude any nestednot-annotatable
from splits execution on them.Therefore, the annotation continues after the nested
not-annotatable
element, within thenot-annotatable
element 🤪The effect is better expressed if I apply the #67 PR, where I removed usage of the redundant
![image](https://private-user-images.githubusercontent.com/68850090/317872374-f98f2e01-f920-432c-b360-669338533174.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA0NTQ1NTIsIm5iZiI6MTcyMDQ1NDI1MiwicGF0aCI6Ii82ODg1MDA5MC8zMTc4NzIzNzQtZjk4ZjJlMDEtZjkyMC00MzJjLWIzNjAtNjY5MzM4NTMzMTc0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA4VDE1NTczMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWViNzQxYWUxMWQ1N2VkZWY1NGE3NGZmYmFkYzlkMDMwMzcyNmRkM2U1MGUyOTZiODgwNmRkYTVkZTlmYTNiZTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ZKaP7mjj4p8umqDQCp9hhX1i_gLkPsm403V2iJQRCv4)
trimRange
method:Possible Solution
Update the
splitAnnotatableRanges
to prevent iterations over any nestednot-annotatable
elements and splitting the ranges on themThe text was updated successfully, but these errors were encountered: