Navigation Menu

Skip to content

Commit

Permalink
Fix reference to document.documentElement and doc warnings (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
bunkscene authored and jasonslyvia committed Sep 5, 2017
1 parent e789b55 commit 95c1b53
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/index.js
Expand Up @@ -78,8 +78,8 @@ const Sortable = createReactClass({
const container = ReactDOM.findDOMNode(this);
const rect = container.getBoundingClientRect();

const scrollTop = (doc.docElement && doc.docElement.scrollTop) || doc.body.scrollTop;
const scrollLeft = (doc.docElement && doc.docElement.scrollLeft) || doc.body.scrollLeft;
const scrollTop = (doc.documentElement && doc.documentElement.scrollTop) || doc.body.scrollTop;
const scrollLeft = (doc.documentElement && doc.documentElement.scrollLeft) || doc.body.scrollLeft;

this._top = rect.top + scrollTop;
this._left = rect.left + scrollLeft;
Expand Down Expand Up @@ -160,7 +160,7 @@ const Sortable = createReactClass({
/**
* getting ready for dragging
* @param {object} e React event
* @param {numbner} index index of pre-dragging item
* @param {index} index of pre-dragging item
*/
handleMouseDown(e, index) {
this._draggingIndex = index;
Expand Down Expand Up @@ -217,7 +217,6 @@ const Sortable = createReactClass({

/**
* replace placeholder with dragging item
* @param {object} e React event
*/
handleMouseUp() {
const _hasMouseMoved = this._isMouseMoving;
Expand Down

0 comments on commit 95c1b53

Please sign in to comment.