Skip to content

Commit

Permalink
bugfix: drag down issue on IE8, IE9 (issue #160, thanks @deeta!)
Browse files Browse the repository at this point in the history
  • Loading branch information
warpech committed Oct 17, 2012
1 parent f3c68d2 commit 68f323f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion jquery.handsontable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ Handsontable.Core = function (rootElement, settings) {
});

self.rootElement.on('finishediting.handsontable', function () {
if(selection.isSelected()) {
if (selection.isSelected()) {
autofill.showHandle();
}
});
Expand Down Expand Up @@ -2597,6 +2597,12 @@ Handsontable.Core = function (rootElement, settings) {
$(this.handle).mousedown(function () {
that.isDragged = 1;
});

this.$container.find('table').on('selectstart', function (event) {
//https://github.com/warpech/jquery-handsontable/issues/160
//selectstart is IE only event. Prevent text from being selected when performing drag down in IE8
event.preventDefault();
});
}

FillHandle.prototype = {
Expand Down
8 changes: 7 additions & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ Handsontable.Core = function (rootElement, settings) {
});

self.rootElement.on('finishediting.handsontable', function () {
if(selection.isSelected()) {
if (selection.isSelected()) {
autofill.showHandle();
}
});
Expand Down Expand Up @@ -2580,6 +2580,12 @@ Handsontable.Core = function (rootElement, settings) {
$(this.handle).mousedown(function () {
that.isDragged = 1;
});

this.$container.find('table').on('selectstart', function (event) {
//https://github.com/warpech/jquery-handsontable/issues/160
//selectstart is IE only event. Prevent text from being selected when performing drag down in IE8
event.preventDefault();
});
}

FillHandle.prototype = {
Expand Down

0 comments on commit 68f323f

Please sign in to comment.