Skip to content

Commit

Permalink
fix #24 and bump to 0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
peutetre committed Mar 4, 2015
1 parent 12d3450 commit 6794797
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ run the <a href="http://peutetre.github.io/mobile-button/test/">tests</a>

## ChangeLog

#### v0.8.1 03-04-2015

* fix `touchcancel` usage [#24](https://github.com/peutetre/mobile-button/issues/24)

#### v0.8.0 12-15-2014

* Add `setActiveCls` option
Expand Down
2 changes: 1 addition & 1 deletion lib/pointer/default/pointer-push-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ PointerPushButton.prototype.onPointermove = function (evt) {
PointerPushButton.prototype._done = function (evt) {
var btn = this;
return function () {
if(btn.monotouchable) btn.unlock();
btn.onPointercancel(evt);
};
};
Expand All @@ -162,6 +161,7 @@ PointerPushButton.prototype.onPointerup = function (evt) {

PointerPushButton.prototype.onPointercancel = function (evt) {
this.setActive(false);
if(this.monotouchable) this.unlock();
this.leftOrEnded = false;
};

Expand Down
2 changes: 1 addition & 1 deletion lib/pointer/default/pointerup-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ PointerupButton.prototype.onPointermove = function (evt) {
PointerupButton.prototype._done = function (evt) {
var btn = this;
return function () {
if(btn.monotouchable) btn.unlock();
btn.onPointercancel(evt);
};
};
Expand All @@ -153,6 +152,7 @@ PointerupButton.prototype.onPointerup = function (evt) {

PointerupButton.prototype.onPointercancel = function (evt) {
this._removeCls();
if(this.monotouchable) this.unlock();
if (this.active) this.active = false;
};

Expand Down
2 changes: 1 addition & 1 deletion lib/touch/default/touch-push-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ TouchPushButton.prototype.onTouchmove = function (evt) {
TouchPushButton.prototype._done = function (evt) {
var btn = this;
return function () {
if(btn.monotouchable) btn.unlock();
btn.onTouchcancel(evt);
};
};
Expand All @@ -142,6 +141,7 @@ TouchPushButton.prototype.onTouchend = function (evt) {

TouchPushButton.prototype.onTouchcancel = function (evt) {
this.setActive(false);
if(this.monotouchable) this.unlock();
this.leftOrEnded = false;
};

Expand Down
2 changes: 1 addition & 1 deletion lib/touch/default/touchend-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ TouchendButton.prototype.onTouchmove = function (evt) {
TouchendButton.prototype._done = function (evt) {
var btn = this;
return function () {
if(btn.monotouchable) btn.unlock();
btn.onTouchcancel(evt);
};
};
Expand All @@ -136,6 +135,7 @@ TouchendButton.prototype.onTouchend = function (evt) {

TouchendButton.prototype.onTouchcancel = function (evt) {
this._removeCls();
if(this.monotouchable) this.unlock();
if(this.active) this.active = false;
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobile-button",
"version": "0.8.0",
"version": "0.8.1",
"description": "A set of buttons for the mobile web",
"author": {
"name": "Paul Panserrieu",
Expand Down

0 comments on commit 6794797

Please sign in to comment.