[Pkg-javascript-commits] [dojo] 73/88: Copy properties for mobile FF, backport, refs #16649 !strict

David Prévot taffit at moszumanska.debian.org
Thu Aug 21 17:39:40 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 91659c3b2291a0631a562b9a70f807fe8cf019d1
Author: Kris Zyp <kriszyp at gmail.com>
Date:   Fri Mar 15 21:17:02 2013 +0000

    Copy properties for mobile FF, backport, refs #16649 !strict
    
    git-svn-id: http://svn.dojotoolkit.org/src/branches/1.8/dojo@30887 560b804f-0ae3-0310-86f3-f6aa0a117693
---
 on.js | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/on.js b/on.js
index 64ca2dd..096ffb3 100644
--- a/on.js
+++ b/on.js
@@ -471,8 +471,17 @@ define(["./has!dom-addeventlistener?:./aspect", "./_base/kernel", "./has"], func
 					}catch(e){} 
 					if(originalEvent.type){
 						// deleting properties doesn't work (older iOS), have to use delegation
-						Event.prototype = originalEvent;
-						var event = new Event;
+						if(has('mozilla')){
+							// Firefox doesn't like delegated properties, so we have to copy
+							var event = {};
+							for(var name in originalEvent){
+								event[name] = originalEvent[name];
+							}
+						}else{
+							// old iOS branch
+							Event.prototype = originalEvent;
+							var event = new Event;
+						}
 						// have to delegate methods to make them work
 						event.preventDefault = function(){
 							originalEvent.preventDefault();

-- 
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