Skip to content

Commit ee8ccd8

Browse files
committed
fix: only binds keys if method handleKeyPress declared
1 parent c55d5d5 commit ee8ccd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/widgets/BaseWidget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class BaseWidget extends blessed.Box {
1313
padding: { left: 1, right: 1 },
1414
}, opts));
1515

16-
if (opts.handleKeys) {
16+
if (opts.handleKeys && this.handleKeyPress) {
1717
this.on('keypress', this.handleKeyPress.bind(this));
1818
}
1919

0 commit comments

Comments
 (0)