antvis/G6

[Bug]: In version 5.0.42, the drag-canvas on the mobile page cannot drag the canvas #6759

zhouyudian posted onGitHub

Describe the bug / 问题描述

在实现官方示例过程中:https://g6.antv.antgroup.com/manual/getting-started/integration/vue

发现在移动端下(涵盖 chrome 模拟移动端、edge 模拟移动端、firefox 模拟移动端、iphone safari),drag-canvas 无法拖拽画布。

No response

Steps to Reproduce the Bug or Issue / 重现步骤

相关依赖包以及版本:

"dependencies": {
  "@antv/g6": "^5.0.42",
  "vue": "^3.5.13"
},
"devDependencies": {
  "@vitejs/plugin-vue": "^5.2.1",
  "@vue/tsconfig": "^0.7.0",
  "typescript": "~5.7.2",
  "vite": "^6.1.0",
  "vue-tsc": "^2.2.0"
}

第一步

安装完依赖后,复制官方示例代码到项目中:https://g6.antv.antgroup.com/manual/getting-started/integration/vue

第二步

在 windows chrome(132.0.6834.160) 下打开页面,拖拽画布,可以正常拖拽

第三步

将 chrome 模拟为 iphone 14 pro max,刷新页面,再拖拽画布,无法正常拖拽。

使用 iphone 14 safari 打开页面,同样无法拖拽画布

备注

  1. 作为对比,"drag-element" 在移动端下表现正常。
  2. 添加 "drag-element" 的 onfinish 事件(https://g6.antv.antgroup.com/api/behaviors/drag-element#onfinish),pc 端和移动端下均可正常触发 onfinish,但是移动端下无法拖拽画布

Version / 版本

🆕 5.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他

Hi, this issue is fixed here.

posted by hustcc 2 months ago

Fund this Issue

$0.00
Funded

Pull requests