[Pkg-javascript-commits] [dojo] 45/88: Don't make copy of event object. It appears to be unnecessary, and it triggers an iOS6 bug with properties in the event object being marked as non-enumerable. Fixes #16108, #16090 on 1.8/ branch !strict.
David Prévot
taffit at moszumanska.debian.org
Thu Aug 21 17:39:35 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 1.8.5
in repository dojo.
commit 2d5a6f68caf4cbb543c44025f2a0453e21fc3026
Author: Bill Keese <bill at dojotoolkit.org>
Date: Fri Nov 30 22:21:15 2012 +0000
Don't make copy of event object. It appears to be unnecessary, and it triggers an iOS6 bug with properties in the event object being marked as non-enumerable. Fixes #16108, #16090 on 1.8/ branch !strict.
git-svn-id: http://svn.dojotoolkit.org/src/branches/1.8/dojo@30095 560b804f-0ae3-0310-86f3-f6aa0a117693
---
touch.js | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/touch.js b/touch.js
index eadaf92..586ed19 100644
--- a/touch.js
+++ b/touch.js
@@ -1,12 +1,12 @@
-define(["./_base/kernel", "./_base/lang", "./aspect", "./dom", "./on", "./has", "./mouse", "./ready", "./_base/window"],
-function(dojo, lang, aspect, dom, on, has, mouse, ready, win){
+define(["./_base/kernel", "./aspect", "./dom", "./on", "./has", "./mouse", "./ready", "./_base/window"],
+function(dojo, aspect, dom, on, has, mouse, ready, win){
// module:
// dojo/touch
var hasTouch = has("touch");
- // TODO for 2.0: detection of IOS version should be moved from mobile/sniff to dojo/sniff
+ // TODO: get iOS version from dojo/sniff after #15827 is fixed
var ios4 = false;
if(has("ios")){
var ua = navigator.userAgent;
@@ -66,23 +66,13 @@ function(dojo, lang, aspect, dom, on, has, mouse, ready, win){
});
});
- // Define synthetic touchmove event that unlike the native touchmove, fires for the node the finger is
+ // Define synthetic touch.move event that unlike the native touchmove, fires for the node the finger is
// currently dragging over rather than the node where the touch started.
touchmove = function(node, listener){
return on(win.doc, "touchmove", function(evt){
if(node === win.doc || dom.isDescendant(hoveredNode, node)){
- listener.call(this, lang.mixin({}, evt, {
- target: hoveredNode,
- // forcing the copy of the "touches" property is needed for iOS6:
- // differently than in iOS 4 and 5, the code used by lang.mixin
- // to iterate over the properties of the source object:
- // for(name in source){ ... }
- // does not hit anymore the "touches" property... Apparently it
- // became a "non-enumerable" property.
- touches: evt.touches,
- preventDefault: function(){evt.preventDefault();},
- stopPropagation: function(){evt.stopPropagation();}
- }));
+ evt.target = hoveredNode;
+ listener.call(this, evt);
}
});
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git
More information about the Pkg-javascript-commits
mailing list