SF-3332 Prevent user from deleting footnotes#3915
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3915 +/- ##
==========================================
- Coverage 81.04% 81.03% -0.02%
==========================================
Files 645 645
Lines 41434 41450 +16
Branches 6748 6730 -18
==========================================
+ Hits 33581 33589 +8
- Misses 6747 6764 +17
+ Partials 1106 1097 -9 ☔ View full report in Codecov by Harness. |
0ceb41d to
d2463c8
Compare
|
This is reviewable in Devin Review. |
marksvc
left a comment
There was a problem hiding this comment.
@marksvc reviewed all commit messages and made 1 comment.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on RaymondLuong3).
src/SIL.XForge.Scripture/ClientApp/src/app/shared/text/text.component.ts line 1955 at r1 (raw file):
textualNoteIndex += op.insert.length; } else if (op.insert != null && typeof op.insert === 'object') { if (op.insert['note'] != null) break;
I would expect that other embeds can likewise be deleted, not just footnotes. Do we have reason to believe that it's only notes that are affected by the bug?
Users were previously allowed to make a selection that included a cross reference or footnote. We do not want to allow users to select these notes which they would then be able to overwrite or delete. This PR introduces logic to identify notes contained in a collection and update the selection be come before the notes.
This change is