Skip to content

Commit

Permalink
Fixed #121
Browse files Browse the repository at this point in the history
  • Loading branch information
JimLiu committed May 5, 2014
1 parent 1fb2f63 commit 62bd804
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "angular-ui-tree",
"version": "2.1.0",
"version": "2.1.1",
"homepage": "https://github.com/JimLiu/angular-ui-tree",
"authors": [
"Jim Liu <https://github.com/JimLiu>",
Expand Down
6 changes: 6 additions & 0 deletions demo/dist/angular-ui-tree.js
Expand Up @@ -831,6 +831,12 @@
return;
}

var eventElmTagName = eventElm.prop('tagName').toLowerCase();
if (eventElmTagName == 'input' ||
eventElmTagName == 'button') { // if it's a input or button, ignore it
return;
}

// check if it or it's parents has a 'data-nodrag' attribute
while (eventElm && eventElm[0] && eventElm[0] != element) {
if ($uiTreeHelper.nodrag(eventElm)) { // if the node mark as `nodrag`, DONOT drag it.
Expand Down
2 changes: 1 addition & 1 deletion demo/dist/angular-ui-tree.min.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions dist/angular-ui-tree.js
Expand Up @@ -831,6 +831,12 @@
return;
}

var eventElmTagName = eventElm.prop('tagName').toLowerCase();
if (eventElmTagName == 'input' ||
eventElmTagName == 'button') { // if it's a input or button, ignore it
return;
}

// check if it or it's parents has a 'data-nodrag' attribute
while (eventElm && eventElm[0] && eventElm[0] != element) {
if ($uiTreeHelper.nodrag(eventElm)) { // if the node mark as `nodrag`, DONOT drag it.
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-ui-tree.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "Angular-NestedSortable",
"version": "2.1.0",
"version": "2.1.1",
"dependencies": {
"grunt": "~0.4.2",
"grunt-contrib-jshint": "~0.8.0",
Expand Down
6 changes: 6 additions & 0 deletions source/directives/uiTreeNode.js
Expand Up @@ -66,6 +66,12 @@
return;
}

var eventElmTagName = eventElm.prop('tagName').toLowerCase();
if (eventElmTagName == 'input' ||
eventElmTagName == 'button') { // if it's a input or button, ignore it
return;
}

// check if it or it's parents has a 'data-nodrag' attribute
while (eventElm && eventElm[0] && eventElm[0] != element) {
if ($uiTreeHelper.nodrag(eventElm)) { // if the node mark as `nodrag`, DONOT drag it.
Expand Down

0 comments on commit 62bd804

Please sign in to comment.