Skip to content

Commit

Permalink
Fix Interactable#preventDefault
Browse files Browse the repository at this point in the history
It had been getting and setting the styleCursor options.
  • Loading branch information
taye committed Aug 2, 2014
1 parent 97c7df4 commit 99f2f7c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions interact.js
Expand Up @@ -998,9 +998,7 @@
return;
}

if (prevent === true
|| (event.type === 'selectstart' && /mouse/.test(prevent))) {

if (prevent === true) {
event.preventDefault();
return;
}
Expand Down Expand Up @@ -3657,18 +3655,18 @@
\*/
preventDefault: function (newValue) {
if (typeof newValue === 'boolean' || newValue === 'auto') {
this.options.styleCursor = newValue;
this.options.preventDefault = newValue;

return this;
}

if (newValue === null) {
delete this.options.styleCursor;
delete this.options.preventDefault;

return this;
}

return this.options.styleCursor;
return this.options.preventDefault;
},

/*\
Expand Down

0 comments on commit 99f2f7c

Please sign in to comment.