|
@@ -190,7 +190,7 @@ function tryFixingNonCollapsedRage( range, schema ) {
|
|
|
const fixedStart = isStartObject ? start : schema.getNearestSelectionRange( start, 'forward' ).start;
|
|
const fixedStart = isStartObject ? start : schema.getNearestSelectionRange( start, 'forward' ).start;
|
|
|
|
|
|
|
|
const isEndObject = end.nodeBefore && schema.isObject( end.nodeBefore );
|
|
const isEndObject = end.nodeBefore && schema.isObject( end.nodeBefore );
|
|
|
- const fixedEnd = isEndObject ? end : schema.getNearestSelectionRange( end, 'backward' ).end;
|
|
|
|
|
|
|
+ const fixedEnd = isEndObject ? null : schema.getNearestSelectionRange( end, 'backward' );
|
|
|
|
|
|
|
|
return new Range( fixedStart ? fixedStart.start : start, fixedEnd ? fixedEnd.start : end );
|
|
return new Range( fixedStart ? fixedStart.start : start, fixedEnd ? fixedEnd.start : end );
|
|
|
}
|
|
}
|