Issue #2328Opened October 14, 2019by MariusDK0 reactions

Cannot read property 'hasFocus' of null

Question

Hey @artf I get the error Cannot read property 'hasFocus' of null when i press 'a', 's', 'd' and 'w' from the keyboard on input text components in the canvas.

Uncaught TypeError: Cannot read property 'hasFocus' of null at Object.hasFocus (grapes.min.js:12) at run (grapes.min.js:3) at Object.method (grapes.min.js:12) at grapes.min.js:3 at HTMLDocument.<anonymous> (grapes.min.js:3) at ZoneDelegate.invokeTask (zone-evergreen.js:391) at Zone.runTask (zone-evergreen.js:168) at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:465) at invokeTask (zone-evergreen.js:1603) at HTMLDocument.globalZoneAwareCallback (zone-evergreen.js:1629)

Answers (1)

MariusDKOctober 15, 20190 reactions

It's about keymaps:

d stands for core:component-delete a stands for core:component-exit s stands for core:component-next w stands for core:component-prev

To solve the error i have to use:

  • Remove all binded keymaps editor.keymaps.removeAll() or
  • Remove the keymap by id editor.keymaps.remove('core:component-delete'); editor.keymaps.remove('core:component-exit'); editor.keymaps.remove('core:component-next'); editor.keymaps.remove('core:component-prev');

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.