From ab6f00fa947bd619dbec19433e1bdecfb4de3d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Ronvel?= Date: Sat, 20 Feb 2021 10:47:54 +0100 Subject: [PATCH] Revert engine changes introduced in v1.49.0 (#156) (will re-introduce it as of v2.0.0) --- CHANGELOG | 6 ++++++ lib/document/BaseMenu.js | 3 ++- package.json | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 90937651..70771a4f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,10 @@ +v1.49.3 +------- + +Revert engine changes introduced in v1.49.0 (#156) (will re-introduce it as of v2.0.0) + + v1.49.2 ------- diff --git a/lib/document/BaseMenu.js b/lib/document/BaseMenu.js index 6d8f51ff..afbc4f8b 100644 --- a/lib/document/BaseMenu.js +++ b/lib/document/BaseMenu.js @@ -297,7 +297,8 @@ BaseMenu.prototype.onKey = function( key , trash , data ) { } break ; case 'submenu' : - if ( this.hasSubmenu && this.focusChild?.def?.items ) { + //if ( this.hasSubmenu && this.focusChild?.def?.items ) { + if ( this.hasSubmenu && this.focusChild && this.focusChild.def && this.focusChild.def.items ) { this.openSubmenu( this.focusChild.value , this.focusChild ) ; if ( this.submenu ) { this.document.giveFocusTo( this.submenu ) ; } } diff --git a/package.json b/package.json index 72ff6088..888f6c1a 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "name": "terminal-kit", - "version": "1.49.2", + "version": "1.49.3", "description": "256 colors, keys and mouse, input field, progress bars, screen buffer (including 32-bit composition and image loading), text buffer, and many more... Whether you just need colors and styles, build a simple interactive command line tool or a complexe terminal app: this is the absolute terminal lib for Node.js!", "main": "lib/termkit.js", "directories": { "test": "test" }, "engines": { - "node": ">=14.0.0" + "node": ">=10.0.0" }, "dependencies": { "@cronvel/get-pixels": "^3.4.0",