From 0fc9e704888b0a02bef8ec3d90ec091bcc9f375b Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 28 Dec 2017 13:54:17 -0500 Subject: [PATCH] delay to search focus on current tab page --- src/popup/app/current/current.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/popup/app/current/current.component.ts b/src/popup/app/current/current.component.ts index 78284ae455..97fb8c132c 100644 --- a/src/popup/app/current/current.component.ts +++ b/src/popup/app/current/current.component.ts @@ -24,7 +24,11 @@ export class CurrentController { this.inSidebar = utilsService.inSidebar($window); this.disableSearch = utilsService.isEdge(); - document.getElementById('search').focus(); + $scope.$on('$viewContentLoaded', function () { + $timeout(function () { + document.getElementById('search').focus(); + }, 50); + }); $scope.$on('syncCompleted', (event: any, successfully: boolean) => { if (this.loaded) {