@syncfusion/ej2-richtexteditor 20.4.40 → 20.4.42

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.
@@ -17609,10 +17609,11 @@ class ToolbarStatus {
17609
17609
  let formatCollection = JSON.parse(JSON.stringify(statusCollection));
17610
17610
  const nodeCollection = JSON.parse(JSON.stringify(statusCollection));
17611
17611
  const nodeSelection = new NodeSelection();
17612
- const nodes = documentNode ? [documentNode] : nodeSelection.getNodeCollection(nodeSelection.getRange(docElement));
17612
+ const range = nodeSelection.getRange(docElement);
17613
+ const nodes = documentNode ? [documentNode] : range.collapsed ? nodeSelection.getNodeCollection(range) :
17614
+ nodeSelection.getSelectionNodeCollectionBr(range);
17613
17615
  const nodesLength = nodes.length;
17614
17616
  let isNodeChanged = false;
17615
- const range = nodeSelection.getRange(docElement);
17616
17617
  for (let index = 0; index < nodes.length; index++) {
17617
17618
  while (nodes[index].nodeType === 3 && range.startContainer.nodeType === 3 && nodes[index].parentNode &&
17618
17619
  nodes[index].parentNode.lastElementChild && nodes[index].parentNode.lastElementChild.nodeName !== 'BR' &&