Skip to content

Commit

Permalink
fix: 🐛 fix some issues (#2528)
Browse files Browse the repository at this point in the history
1、解决点击画布时,input无法正常失去焦点
2、添加touch-action: none;阻止移动端中滑动节点页面一起移动
3、#2527
  • Loading branch information
babachao authored Aug 16, 2022
1 parent a9dcc84 commit 17dcde8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/x6/src/graph/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ export class GraphView extends View {
if (view) {
view.onMouseDown(e, localPoint.x, localPoint.y)
} else {
if (this.options.preventDefaultBlankAction) {
if (
this.options.preventDefaultBlankAction &&
['touchstart'].includes(e.type)
) {
e.preventDefault()
}

Expand Down
1 change: 1 addition & 0 deletions packages/x6/src/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
.@{x6-prefix}-graph {
position: relative;
outline: none;
touch-action: none;

&-background,
&-grid,
Expand Down

0 comments on commit 17dcde8

Please sign in to comment.