即使包含了Touch插件,Block:Drag事件在触摸设备上依然无法工作
问题
葡萄JS版本
- 我确认使用最新版本的GrapesJS
你用的是什么浏览器?
Chrome 桌面版本 108.0.5359.125 最新版本
可复制演示链接
无
描述一下那个虫子
如何复现这个漏洞? 当从块管理器拖拽组件时,事件不会触发。
如果需要执行某些代码以重现该漏洞,请将其粘贴到下面: “''js editor.on('block:drag',函数 (e, a) { 编辑。Commands.run('hide-panels') })
### 行为准则
- [X] 我同意遵守本项目的行为准则
回答(2)
谢谢@joukhar实际上“阻挡:拖拽”事件存在一些不一致,我会在下一个版本中尝试修复。
谢谢你举报,@joukhar。 关于block:drag事件在触摸设备上即使包含了触摸插件也无法正常工作,这个问题非常好。推荐的组件方法是使用事件驱动的API。 从这里开始: 查看你所在模块的[GrapesJS文档](https://grapesjs.com/docs/) 寻找“on()”事件监听器方法 大多数操作可以通过监听编辑器和组件事件来实现 常见模式: “JavaScript 留意变化 editor.on('change', () => console.log('something changed')); 组件生命周期 editor.on('component:mount', (c)...
相关问答
通过相似的问题讨论继续研究。
问题 #4851
This.on('change:attributes:type', this.handleTypeChange)不支持数组类型
葡萄JS版本[X] 我确认使用最新版本的GrapesJS你用的是什么浏览器? Chrome 108.0.5359.125可复制演示链接 https://codesandbox.io/s/frosty-darkness-7po7xl描述一下那个虫子 如何复现这个漏洞?使用 myB...
问题 #4801
React 组件组件 WillUnmount 不会被调用
葡萄JS版本[X] 我确认使用最新版本的GrapesJS你用的是什么浏览器? Chrome 108.0.5359.125(Windows)可复制演示链接 https://codesandbox.io/s/white-meadow-o56l2d?file=/src/Chart/C...
问题 #4841
不要使用 component.addAttributes({[traitName]:value}),有时应该使用 component.set(traitName, value)
葡萄JS版本 [X] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Chrome 108.0.5359.125 可复制演示链接 https://codesandbox.io/s/sweet-hugle-w00pqx 描述一下那个虫子 如何复现这个漏洞?拖我的街区查...
问题 #6409
手机上无法拖动移动组件
葡萄JS版本 [x] 我确认使用最新版本的GrapesJS 你用的是什么浏览器? Chrome v133 可复制演示链接 https://jsfiddle.net/2hjdrb7L/1/ 描述一下那个虫子 如何复现这个漏洞? 用grapesjs v0.22.x和grapesjs...
与此问题匹配的付费插件
根据问题关键词和标签相关性精选,助你更快交付。
正在加载付费插件推荐……
相关教程
关于同一主题的深入指南。
教程
GrapesJS DevTools: A Developer Panel Inside Your Editor
If you've ever debugged GrapesJS with console.log(editor.getSelected()) and a dozen throwaway event listeners — this post is for you.
教程
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
教程
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins — TinyMCE Inline Text Editor and Placeholder.
浏览插件分类
直接跳转到市场上的插件分类页面。