Skip to content

Commit

Permalink
closes #18
Browse files Browse the repository at this point in the history
Shouldn't select text in IE when dragging
  • Loading branch information
michaelmalonenz committed Aug 10, 2016
1 parent 389874c commit ca0c0e2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/dragula.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,10 @@ export class Dragula {
}
this._grabbed = context;
this._eventualMovements();
if (e.type === 'mousedown') {
if (Util.isInput(item)) { // see also: https://github.com/bevacqua/dragula/issues/208
item.focus(); // fixes https://github.com/bevacqua/dragula/issues/176
} else {
e.preventDefault(); // fixes https://github.com/bevacqua/dragula/issues/155
}
if (Util.isInput(item)) { // see also: https://github.com/bevacqua/dragula/issues/208
item.focus(); // fixes https://github.com/bevacqua/dragula/issues/176
} else {
e.preventDefault(); // fixes https://github.com/bevacqua/dragula/issues/155
}
}

Expand Down

0 comments on commit ca0c0e2

Please sign in to comment.