@worktile/theia 13.1.3 → 13.1.4

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.
@@ -2089,6 +2089,10 @@ const isEmptyContent = (children) => {
2089
2089
  return false;
2090
2090
  };
2091
2091
 
2092
+ const isGlobalCollapsed = (editor) => {
2093
+ return editor && editor.selection && Range.isCollapsed(editor.selection);
2094
+ };
2095
+
2092
2096
  var index$1 = /*#__PURE__*/Object.freeze({
2093
2097
  __proto__: null,
2094
2098
  getLastNode: getLastNode,
@@ -2148,7 +2152,8 @@ var index$1 = /*#__PURE__*/Object.freeze({
2148
2152
  findDescendant: findDescendant,
2149
2153
  someNode: someNode,
2150
2154
  getToolbarItemDisabled: getToolbarItemDisabled,
2151
- getPluginByToolbarItem: getPluginByToolbarItem
2155
+ getPluginByToolbarItem: getPluginByToolbarItem,
2156
+ isGlobalCollapsed: isGlobalCollapsed
2152
2157
  });
2153
2158
 
2154
2159
  const insertElements = (editor, elements) => {
@@ -10263,7 +10268,7 @@ class TheTdComponent extends TheBaseElementComponent {
10263
10268
  this.display = this.element.hidden ? 'none' : '';
10264
10269
  }
10265
10270
  useFocus() {
10266
- if (this.isCollapsedAndNonReadonly) {
10271
+ if (this.isCollapsedAndNonReadonly && isGlobalCollapsed(this.editor)) {
10267
10272
  this.renderer.addClass(this.elementRef.nativeElement, 'focused-cell');
10268
10273
  }
10269
10274
  else {