Skip to content

Commit

Permalink
perf: 优化切换tab不能输入命令问题
Browse files Browse the repository at this point in the history
  • Loading branch information
huailei000 committed Dec 22, 2023
1 parent 84b1f43 commit 9d9717f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/app/elements/content/content.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ export class ElementContentComponent implements OnInit, OnDestroy {
handleKeyDownTabChange() {
this.keyboardSubscription = fromEvent(window, 'keydown').subscribe((event: any) => {
if (event.altKey && (event.key === 'ArrowRight' || event.key === 'ArrowLeft') && this.viewList.length > 1) {
let timer = null;
window.onblur = () => {
timer = setTimeout(() => window.focus(), 100);
};
let nextViewId: any = 0;
let nextActiveView = null;
const viewIds = this.viewSrv.viewIds;
Expand All @@ -119,7 +115,6 @@ export class ElementContentComponent implements OnInit, OnDestroy {
}
if (nextActiveView) {
this.setViewActive(nextActiveView);
timer = null;
}
}
});
Expand Down

0 comments on commit 9d9717f

Please sign in to comment.