Skip to content

Commit 3214cd4

Browse files
authored
Merge pull request #308 from jeff-phillips-18/fixes
Add a timeout when updating vertical nav on window resize event
2 parents 4199b06 + 3a8c2ff commit 3214cd4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/navigation/vertical-navigation-directive.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,11 +1102,13 @@
11021102

11031103
angular.element($window).bind('resize', function () {
11041104
checkNavState();
1105-
try {
1106-
$scope.$apply();
1107-
} catch (e) {
1108-
// Ignore, if we already applied, that is fine.
1109-
}
1105+
$timeout(function () {
1106+
try {
1107+
$scope.$apply();
1108+
} catch (e) {
1109+
// Ignore, if we already applied, that is fine.
1110+
}
1111+
});
11101112
});
11111113
}
11121114
};

0 commit comments

Comments
 (0)