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
fix(comments): allow ranges to be collapsed (#5892)
* fix(portable-text-editor): all paths must be checked
This optimization was a bit too optimistic.
It's causing issues with some type of selections.
Check every path here.
* fix(portable-text-editor): allow uncollapsed ranges
Uncollapsed ranges must be allowed as they may be pointing to empty blocks
* fix(comments): allow ranges to be collapsed
This is needed to support including empty blocks within the commented range
Copy file name to clipboardExpand all lines: packages/sanity/src/structure/comments/src/utils/inline-comments/buildRangeDecorationSelectionsFromComments.ts
+19-24
Original file line number
Diff line number
Diff line change
@@ -137,31 +137,26 @@ export function buildRangeDecorationSelectionsFromComments(
137
137
break
138
138
}
139
139
}
140
-
// If range is now collapsed, don't create a decoration
0 commit comments