eax icon indicating copy to clipboard operation
eax copied to clipboard

Error: Cannot read property 'width' of null

Open ctjhoa opened this issue 5 years ago • 2 comments

Hi,

Typing '?' inside a folder leads to this error:

TypeError: Cannot read property 'width' of null
    at Prompt.Element._getLeft (/home/ctjhoa/.npm/_npx/949096/lib/node_modules/ember-app-explorer/node_modules/blessed/lib/widgets/element.js:1158:19)
    at Prompt.aleft (/home/ctjhoa/.npm/_npx/949096/lib/node_modules/ember-app-explorer/node_modules/blessed/lib/widgets/element.js:1181:15)
    at Textbox.Element._getLeft (/home/ctjhoa/.npm/_npx/949096/lib/node_modules/ember-app-explorer/node_modules/blessed/lib/widgets/element.js:1177:18)
    at Textbox.Element._getCoords (/home/ctjhoa/.npm/_npx/949096/lib/node_modules/ember-app-explorer/node_modules/blessed/lib/widgets/element.js:1678:17)
    at Textbox.Textarea._updateCursor (/home/ctjhoa/.npm/_npx/949096/lib/node_modules/ember-app-explorer/node_modules/blessed/lib/widgets/textarea.js:77:37)
    at Textbox.Textarea.input.Textarea.setInput.Textarea.readInput (/home/ctjhoa/.npm/_npx/949096/lib/node_modules/ember-app-explorer/node_modules/blessed/lib/widgets/textarea.js:147:8)
    at Prompt.input.Prompt.setInput.Prompt.readInput (/home/ctjhoa/.npm/_npx/949096/lib/node_modules/ember-app-explorer/node_modules/blessed/lib/widgets/prompt.js:105:16)
    at Object.search (/home/ctjhoa/.npm/_npx/949096/lib/node_modules/ember-app-explorer/src/pages/models.js:36:14)
    at List.<anonymous> (/home/ctjhoa/.npm/_npx/949096/lib/node_modules/ember-app-explorer/node_modules/blessed/lib/widgets/list.js:184:29)
    at List.EventEmitter._emit (/home/ctjhoa/.npm/_npx/949096/lib/node_modules/ember-app-explorer/node_modules/blessed/lib/events.js:94:20)

Reproduction steps:

  • Run npx ember-app-explorer
  • Type 'c' to go to the components page
  • Type '?' => exception

ctjhoa avatar Jul 27 '20 07:07 ctjhoa

Looks like an issue with blessed library, I am adding ! key also as a shortcut for help. This is just a workaround not the actual fix.

rajasegar avatar Jul 27 '20 12:07 rajasegar

Thanks for the clearly defined reproduction steps @ctjhoa

rajasegar avatar Jul 27 '20 12:07 rajasegar