mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-20 22:21:20 +02:00
Fix rendering of collapsed annotation at offset zero. (#2918)
This commit is contained in:
committed by
Ian Storm Taylor
parent
2ea6d40ad0
commit
9a2b53e81c
@@ -194,7 +194,11 @@ class Text extends Record(DEFAULTS) {
|
||||
}
|
||||
|
||||
// If the range starts after the leaf, or ends before it, continue.
|
||||
if (start.offset > offset + length || end.offset <= offset) {
|
||||
if (
|
||||
start.offset > offset + length ||
|
||||
end.offset < offset ||
|
||||
(end.offset === offset && offset !== 0)
|
||||
) {
|
||||
next.push(leaf)
|
||||
continue
|
||||
}
|
||||
|
Reference in New Issue
Block a user