Skip to content

Commit

Permalink
Generated new build
Browse files Browse the repository at this point in the history
  • Loading branch information
Niels Dequeker committed Apr 27, 2015
1 parent 2e688e3 commit 9daf019
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
19 changes: 13 additions & 6 deletions dist/angular-ui-tree.js
Expand Up @@ -923,12 +923,19 @@
element.bind('touchend touchcancel mouseup',function(){$timeout.cancel(dragTimer);});
};
bindDrag();

angular.element($window.document.body).bind("keydown", function(e) {
if (e.keyCode == 27) {
scope.$$apply = false;
dragEnd(e);
}

var keydownHandler = function(e) {
if (e.keyCode == 27) {
scope.$$apply = false;
dragEnd(e);
}
};

angular.element($window.document.body).bind("keydown", keydownHandler);

//unbind handler that retains scope
scope.$on('$destroy', function () {
angular.element($window.document.body).unbind("keydown", keydownHandler);
});
}
};
Expand Down

0 comments on commit 9daf019

Please sign in to comment.