@ckeditor/ckeditor5-typing 41.4.0-alpha.0 → 41.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/deleteobserver.js +5 -6
package/dist/index.js
CHANGED
|
@@ -813,11 +813,8 @@ class DeleteObserver extends Observer {
|
|
|
813
813
|
ignoreElementEnd: true
|
|
814
814
|
});
|
|
815
815
|
let count = 0;
|
|
816
|
-
for (const { nextPosition } of walker){
|
|
817
|
-
|
|
818
|
-
if (!nextPosition.parent.is('$text')) {
|
|
819
|
-
count++;
|
|
820
|
-
} else {
|
|
816
|
+
for (const { nextPosition, item } of walker){
|
|
817
|
+
if (nextPosition.parent.is('$text')) {
|
|
821
818
|
const data = nextPosition.parent.data;
|
|
822
819
|
const offset = nextPosition.offset;
|
|
823
820
|
// Count combined symbols and emoji sequences as a single character.
|
|
@@ -825,6 +822,8 @@ class DeleteObserver extends Observer {
|
|
|
825
822
|
continue;
|
|
826
823
|
}
|
|
827
824
|
count++;
|
|
825
|
+
} else if (item.is('containerElement') || item.is('emptyElement')) {
|
|
826
|
+
count++;
|
|
828
827
|
}
|
|
829
828
|
if (count > 1) {
|
|
830
829
|
return true;
|