Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] el-tree allowDrop breaks if .el-tree-node__content height is too large #11635

Closed
hsindesu opened this issue Jun 14, 2018 · 1 comment

Comments

@hsindesu
Copy link

hsindesu commented Jun 14, 2018

Element UI version

2.4.1

OS/Browsers version

Windows 10/ Chrome 67

Vue version

2.5.16

Reproduction Link

https://codepen.io/yancyknight/pen/VdzyBr

Steps to reproduce

allowDrop: function(draggingNode, dropNode, type) {
      if (type !== 'inner') {
        return false;
      }
      return true;
}

When the .el-tree-node__content is default height, this works as expected and disallows drops between nodes. If you give .el-tree-node__content class 48px height, margin, or padding (whatever increase the overall height of the tree node), it allows drops between nodes and sometimes will drop in the wrong place if you do try to drop between nodes.

What is Expected?

allowDrop will perform as expected regardless of .el-tree-node__content height.

What is actually happening?

el-tree is allowing nodes to be dropped even though allowDrop is returning false.

@TY-LIU
Copy link

TY-LIU commented Jun 22, 2018

我也遇到了同样的问题,.el-tree-node__content自定义高度超过了默认高度拖拽会出现异常

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants