From 5f929b3d63926288299968aed9f12143527852dc Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 7 Feb 2017 20:14:56 -0700 Subject: [PATCH] comment --- core/button_view.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/button_view.js b/core/button_view.js index dec1cd10..007ca29f 100644 --- a/core/button_view.js +++ b/core/button_view.js @@ -1,10 +1,9 @@ /* jslint node: true */ 'use strict'; -var TextView = require('./text_view.js').TextView; -var miscUtil = require('./misc_util.js'); -var util = require('util'); -var assert = require('assert'); +const TextView = require('./text_view.js').TextView; +const miscUtil = require('./misc_util.js'); +const util = require('util'); exports.ButtonView = ButtonView; @@ -20,7 +19,8 @@ function ButtonView(options) { util.inherits(ButtonView, TextView); ButtonView.prototype.onKeyPress = function(ch, key) { - if(' ' === ch) { + // allow space = submit + if(' ' === ch) { this.emit('action', 'accept'); }