@worktile/theia 14.2.8 → 14.2.10

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.
@@ -10198,10 +10198,10 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
10198
10198
  this.initializeSearch();
10199
10199
  this.initializePluginMenu();
10200
10200
  this.buildMenus();
10201
+ this.scrollContainer = this.elementRef.nativeElement.querySelector('.the-plugin-menu-scroll-container');
10201
10202
  }
10202
10203
  initializeSearch() {
10203
10204
  if (this.theDisplaySearch) {
10204
- this.scrollContainer = this.elementRef.nativeElement.querySelector('.the-plugin-menu-scroll-container');
10205
10205
  this.keyboardContainer = this.elementRef.nativeElement;
10206
10206
  setTimeout(() => {
10207
10207
  // 记住位置
@@ -10275,7 +10275,9 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
10275
10275
  updateKeywords(keywords) {
10276
10276
  this.keyWords = keywords.toLowerCase().trim();
10277
10277
  this.buildMenus();
10278
- this.scrollContainer.scrollTop = 0;
10278
+ if (this.scrollContainer) {
10279
+ this.scrollContainer.scrollTop = 0;
10280
+ }
10279
10281
  }
10280
10282
  theListboxChange(event) {
10281
10283
  if (event.type === 'select') {