Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: 优化切换tab不能输入命令问题 #1034

Merged
merged 1 commit into from Dec 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/app/elements/content/content.component.ts
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