mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-27 13:06:09 +02:00
Additional fixes from code review comments
This commit is contained in:
parent
049c3a870a
commit
d4098ed114
2 changed files with 3 additions and 4 deletions
|
@ -21,8 +21,7 @@ function ButtonView(options) {
|
|||
util.inherits(ButtonView, TextView);
|
||||
|
||||
ButtonView.prototype.onKeyPress = function(ch, key) {
|
||||
let actionForKeyName = key ? key.name : ch;
|
||||
if(this.isKeyMapped('accept', actionForKeyName) || ' ' === ch) {
|
||||
if(this.isKeyMapped('accept', (key ? key.name : ch)) || ' ' === ch) {
|
||||
this.submitData = 'accept';
|
||||
this.emit('action', 'accept');
|
||||
delete this.submitData;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue