diff options
| author | Igor Minar | 2012-06-12 00:11:04 -0700 |
|---|---|---|
| committer | Igor Minar | 2012-06-12 00:11:04 -0700 |
| commit | d9ff5fd432314d2b5f5e6766240c918f10d3b83d (patch) | |
| tree | 0a2e2a035525293fe7db8b96d6446fe372ecf006 /docs/src/templates/js/docs.js | |
| parent | f16150d5f1b20b3d633b4402095ea89baa4be042 (diff) | |
| download | angular.js-d9ff5fd432314d2b5f5e6766240c918f10d3b83d.tar.bz2 | |
fix(docs): migrate from $defer to $timeout
Diffstat (limited to 'docs/src/templates/js/docs.js')
| -rw-r--r-- | docs/src/templates/js/docs.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/src/templates/js/docs.js b/docs/src/templates/js/docs.js index 2eaa7c29..de40db64 100644 --- a/docs/src/templates/js/docs.js +++ b/docs/src/templates/js/docs.js @@ -5,16 +5,18 @@ var docsApp = { }; -docsApp.directive.focused = function($defer) { +docsApp.directive.focused = function($timeout) { return function(scope, element, attrs) { element[0].focus(); element.bind('focus', function() { scope.$apply(attrs.focused + '=true'); }); element.bind('blur', function() { - // have to use defer, so that we close the drop-down after the user clicks, + // have to use $timeout, so that we close the drop-down after the user clicks, // otherwise when the user clicks we process the closing before we process the click. - $defer(attrs.focused + '=false'); + $timeout(function() { + scope.$eval(attrs.focused + '=false'); + }); }); scope.$eval(attrs.focused + '=true') } |
