@worktile/theia 20.2.12 → 20.3.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.
@@ -6,8 +6,8 @@ import { ThyAction, ThyActions } from 'ngx-tethys/action';
6
6
  import { ThyDropdownMenuItemDirective, ThyDropdownMenuDivider, ThyDropdownMenuItemNameDirective, ThyDropdownMenuItemIconDirective, ThyDropdownMenuItemActiveDirective, ThyDropdownMenuComponent, ThyDropdownMenuGroup, ThyDropdownDirective, ThyDropdownMenuItemExtendIconDirective } from 'ngx-tethys/dropdown';
7
7
  import * as i2$5 from 'ngx-tethys/icon';
8
8
  import { ThyIcon, ThyIconRegistry } from 'ngx-tethys/icon';
9
- import { cloneDeep, map, every, assign, defaults, groupBy, uniq, isEqual } from 'lodash';
10
- export { assign, cloneDeep, debounce, defaults, groupBy, isEqual, map, uniq } from 'lodash';
9
+ import { cloneDeep, map, every, assign, defaults, groupBy, uniq, isEqual } from 'lodash-es';
10
+ export { assign, cloneDeep, debounce, defaults, groupBy, isEqual, map, uniq } from 'lodash-es';
11
11
  import { Editor, Element, Span, Range, Path, Node, Point, Text, Transforms, Operation, createEditor } from 'slate';
12
12
  import * as i4 from 'slate-angular';
13
13
  import { FAKE_LEFT_BLOCK_CARD_OFFSET, FAKE_RIGHT_BLOCK_CARD_OFFSET, getClipboardData, AngularEditor, hotkeys, getPlainText as getPlainText$1, createClipboardData, setClipboardData, BaseElementComponent, IS_SAFARI, ELEMENT_TO_COMPONENT, SlateModule, getBlockCardByNativeElement, SLATE_BLOCK_CARD_CLASS_NAME, EDITOR_TO_VIRTUAL_SCROLL_SELECTION, BaseElementFlavour, hasBlockCard, isCardLeft, getCachedHeightByElement, isDebug, debugLog, cacheHeightByElement, DEFAULT_ELEMENT_HEIGHT, DefaultTextFlavour, defaultScrollSelectionIntoView, getDataTransferClipboard, SLATE_DEBUG_KEY, withAngular } from 'slate-angular';
@@ -7229,9 +7229,7 @@ class TheCode extends TheBaseElement {
7229
7229
  this.useMode();
7230
7230
  this.useAutoWrap();
7231
7231
  this.useHeight();
7232
- if (this.isCollapsedAndNonReadonly) {
7233
- this.useAutofocus();
7234
- }
7232
+ this.useAutofocus();
7235
7233
  }
7236
7234
  codeChange($event) {
7237
7235
  this.isHightLight = false;
@@ -7272,7 +7270,9 @@ class TheCode extends TheBaseElement {
7272
7270
  this.options = { ...this.options, readonly: this.readonly, cursorBlinkRate: this.readonly ? -1 : 500 };
7273
7271
  }
7274
7272
  useAutofocus() {
7275
- this.options = { ...this.options, autofocus: this.readonly ? false : true };
7273
+ if (this.isCollapsedAndNonReadonly && Range.isCollapsed(this.editor.selection)) {
7274
+ this.options = { ...this.options, autofocus: this.readonly ? false : true };
7275
+ }
7276
7276
  }
7277
7277
  onResize({ height }) {
7278
7278
  this.resizeHeight = height;