Skip to content

Commit

Permalink
Fixes missing touch.release events on some dojox/mobile widgets by al…
Browse files Browse the repository at this point in the history
…ways listening to touch.release on the toplevel document. Thanks Eric Durocher (IBM, CCLA)

git-svn-id: http://svn.dojotoolkit.org/src/dojox/trunk@30664 560b804f-0ae3-0310-86f3-f6aa0a117693
  • Loading branch information
cjolif committed Feb 22, 2013
1 parent 8ab24df commit b3be799
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mobile/Switch.js
Expand Up @@ -169,7 +169,7 @@ define([
if(!this._conn){
this._conn = [
this.connect(this.inner, touch.move, "onTouchMove"),
this.connect(this.inner, touch.release, "onTouchEnd")
this.connect(win.doc, touch.release, "onTouchEnd")
];
}
this.touchStartX = e.touches ? e.touches[0].pageX : e.clientX;
Expand Down
5 changes: 3 additions & 2 deletions mobile/_EditableIconMixin.js
Expand Up @@ -4,6 +4,7 @@ define([
"dojo/_base/declare",
"dojo/_base/event",
"dojo/_base/lang",
"dojo/_base/window",
"dojo/dom-geometry",
"dojo/dom-style",
"dojo/touch",
Expand All @@ -12,7 +13,7 @@ define([
"./sniff",
"./viewRegistry",
"./_css3"
], function(array, connect, declare, event, lang, domGeometry, domStyle, touch, registry, IconItem, has, viewRegistry, css3){
], function(array, connect, declare, event, lang, win, domGeometry, domStyle, touch, registry, IconItem, has, viewRegistry, css3){

// module:
// dojox/mobile/_EditableIconMixin
Expand Down Expand Up @@ -131,7 +132,7 @@ define([
if(!this._conn){
this._conn = [
this.connect(this.domNode, touch.move, "_onTouchMove"),
this.connect(this.domNode, touch.release, "_onTouchEnd")
this.connect(win.doc, touch.release, "_onTouchEnd")
];
}
this._touchStartPosX = e.touches ? e.touches[0].pageX : e.pageX;
Expand Down
5 changes: 3 additions & 2 deletions mobile/_EditableListMixin.js
Expand Up @@ -5,13 +5,14 @@ define([
"dojo/_base/connect",
"dojo/_base/declare",
"dojo/_base/event",
"dojo/_base/window",
"dojo/dom-class",
"dojo/dom-geometry",
"dojo/dom-style",
"dojo/touch",
"dijit/registry",
"./ListItem"
], function(array, connect, declare, event, domClass, domGeometry, domStyle, touch, registry, ListItem){
], function(array, connect, declare, event, win, domClass, domGeometry, domStyle, touch, registry, ListItem){

// module:
// dojox/mobile/EditableRoundRectList
Expand Down Expand Up @@ -111,7 +112,7 @@ define([
if(!this._conn){
this._conn = [
this.connect(this.domNode, touch.move, "_onTouchMove"),
this.connect(this.domNode, touch.release, "_onTouchEnd")
this.connect(win.doc, touch.release, "_onTouchEnd")
];
}
this._pos = [];
Expand Down

0 comments on commit b3be799

Please sign in to comment.