Permalink
Browse files

ability to recover cursor if it somehow gets lost

  • Loading branch information...
raycohen committed Jan 29, 2012
1 parent bbd4e3d commit 7086a69d6e20f6815225eb36790dd2b8d701fe1d
Showing with 6 additions and 1 deletion.
  1. +6 −1 emberjs-app/public/javascripts/main.js
@@ -15,7 +15,12 @@ var App = Ember.Application.create({
keyDown: function(e) {
if (App.selectedView && App.selectedView.keyDown) {
return App.selectedView.keyDown(e);
- }
+ }
+
+ // In case an error of some kind leaves us with no cursor position.
+ if (!App.selectedView) {
+ App.feedCollectionView.select();
+ }
},
ready: function() {

0 comments on commit 7086a69

Please sign in to comment.