PageKit — 可自托管的 GrapesJS 建站工具,附完整源码。 获取抢先体验

问题 #2328💬 已回答提出于 2019年10月14日作者 MariusDK0 个反应

无法读取null的属性“hasFocus”

快速解答作者 MariusDK

它讲的是keymap: D 代表 core:组件delete A 代表 core:组件-exit S 代表 core:component-next W 代表 core:组件prev 为了解决这个错误,我必须使用:移除所有绑定的键映射 'editor.keymaps.removeAll()' 或通过id移除键映射 'editor.keymaps.remove('core:component-delete');' 'editor.keymaps.remove('core:component-exit');' 'editor.keymaps.remove('core:component-next');' 'editor.keymaps....

阅读下方完整回答 ↓

问题

嘿,@artf 当我在画布中的输入文本组件上按键盘的“a”、“s”、“d”和“w”时,会_Cannot读取属性“hasFocus”null_的错误。

未捕获类型错误:无法读取null的属性“hasFocus” 在Object.hasFocus(grapes.min.js:12) 跑步时(grapes.min.js分3秒) 在 Object.method (grapes.min.js:12) 在grapes.min.js:3 收录于HTMLDocument。<anonymous> (grapes.min.js:3) 在ZoneDelegate.invokeTask(zone-evergreen.js:391) 在Zone.runTask(zone-evergreen.js:168) 在ZoneTask.invokeTask [作为invoke] (zone-evergreen.js:465) 在invokeTask(zone-evergreen.js:1603) 在HTMLDocument.globalZoneAwareCallback (zone-evergreen.js:1629)

回答(1)

MariusDK• 2019年10月15日

它讲的是keymap: D 代表 core:组件delete A 代表 core:组件-exit S 代表 core:component-next W 代表 core:组件prev 为了解决这个错误,我必须使用:移除所有绑定的键映射 'editor.keymaps.removeAll()' 或通过id移除键映射 'editor.keymaps.remove('core:component-delete');' 'editor.keymaps.remove('core:component-exit');' 'editor.keymaps.remove('core:component-next'...

相关问答

通过相似的问题讨论继续研究。

与此问题匹配的付费插件

根据问题关键词和标签相关性精选,助你更快交付。

查看全部插件

正在加载付费插件推荐……

免费方案

在以下平台查看开源 GrapesJS 插件: GitHub 或在我们的免费目录中快速搜索。

浏览免费插件 →
高级方案

高级插件提供支持、定期更新和生产就绪的功能——为你节省数天的集成工作。

浏览高级插件 →

浏览插件分类

直接跳转到市场上的插件分类页面。