diff --git a/build/bundle.js b/build/bundle.js index 72509bf3..6db17a2b 100644 --- a/build/bundle.js +++ b/build/bundle.js @@ -11509,12 +11509,10 @@ var CommandPromptView = Backbone.View.extend({ blur: function() { this.listening = false; - console.log('blurrring'); this.hideCursor(); }, focus: function() { - console.log('focusing'); this.listening = true; this.$('#commandTextField').focus(); this.showCursor(); @@ -13756,8 +13754,8 @@ var KeyboardListener = require('../util/keyboard').KeyboardListener; var MultiView = Backbone.View.extend({ tagName: 'div', className: 'multiView', - // ms to throttle the nav functions - navEventThrottle: 150, + // ms to debounce the nav functions + navEventDebounce: 750, deathTime: 700, // a simple mapping of what childViews we support @@ -13801,15 +13799,15 @@ var MultiView = Backbone.View.extend({ }, getPosFunc: function() { - return _.throttle(_.bind(function() { + return _.debounce(_.bind(function() { this.navForward(); - }, this), this.navEventThrottle); + }, this), this.navEventDebounce, true); }, getNegFunc: function() { - return _.throttle(_.bind(function() { + return _.debounce(_.bind(function() { this.navBackward(); - }, this), this.navEventThrottle); + }, this), this.navEventDebounce, true); }, navForward: function() { @@ -16685,12 +16683,10 @@ var CommandPromptView = Backbone.View.extend({ blur: function() { this.listening = false; - console.log('blurrring'); this.hideCursor(); }, focus: function() { - console.log('focusing'); this.listening = true; this.$('#commandTextField').focus(); this.showCursor(); @@ -17246,8 +17242,8 @@ var KeyboardListener = require('../util/keyboard').KeyboardListener; var MultiView = Backbone.View.extend({ tagName: 'div', className: 'multiView', - // ms to throttle the nav functions - navEventThrottle: 150, + // ms to debounce the nav functions + navEventDebounce: 750, deathTime: 700, // a simple mapping of what childViews we support @@ -17291,15 +17287,15 @@ var MultiView = Backbone.View.extend({ }, getPosFunc: function() { - return _.throttle(_.bind(function() { + return _.debounce(_.bind(function() { this.navForward(); - }, this), this.navEventThrottle); + }, this), this.navEventDebounce, true); }, getNegFunc: function() { - return _.throttle(_.bind(function() { + return _.debounce(_.bind(function() { this.navBackward(); - }, this), this.navEventThrottle); + }, this), this.navEventDebounce, true); }, navForward: function() { diff --git a/src/js/views/commandViews.js b/src/js/views/commandViews.js index 821b3fe9..21ca06d6 100644 --- a/src/js/views/commandViews.js +++ b/src/js/views/commandViews.js @@ -71,12 +71,10 @@ var CommandPromptView = Backbone.View.extend({ blur: function() { this.listening = false; - console.log('blurrring'); this.hideCursor(); }, focus: function() { - console.log('focusing'); this.listening = true; this.$('#commandTextField').focus(); this.showCursor(); diff --git a/src/js/views/multiView.js b/src/js/views/multiView.js index 8592d574..9f4c8baa 100644 --- a/src/js/views/multiView.js +++ b/src/js/views/multiView.js @@ -14,8 +14,8 @@ var KeyboardListener = require('../util/keyboard').KeyboardListener; var MultiView = Backbone.View.extend({ tagName: 'div', className: 'multiView', - // ms to throttle the nav functions - navEventThrottle: 150, + // ms to debounce the nav functions + navEventDebounce: 750, deathTime: 700, // a simple mapping of what childViews we support @@ -59,15 +59,15 @@ var MultiView = Backbone.View.extend({ }, getPosFunc: function() { - return _.throttle(_.bind(function() { + return _.debounce(_.bind(function() { this.navForward(); - }, this), this.navEventThrottle); + }, this), this.navEventDebounce, true); }, getNegFunc: function() { - return _.throttle(_.bind(function() { + return _.debounce(_.bind(function() { this.navBackward(); - }, this), this.navEventThrottle); + }, this), this.navEventDebounce, true); }, navForward: function() {