[Pkg-javascript-commits] [dojo] 04/07: Fixes #9172 in the 1.3 branch.
David Prévot
taffit at moszumanska.debian.org
Mon May 11 20:12:23 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 1.3.1
in repository dojo.
commit 0ea1282e31387ce45b95d5eb0209bfdf1114b050
Author: James Burke <jrburke at gmail.com>
Date: Wed Apr 22 04:17:57 2009 +0000
Fixes #9172 in the 1.3 branch.
git-svn-id: http://svn.dojotoolkit.org/src/branches/1.3/dojo@17372 560b804f-0ae3-0310-86f3-f6aa0a117693
---
io/iframe.js | 22 +++++++++-------------
tests/io/iframe.html | 19 +++++++++++++++++++
2 files changed, 28 insertions(+), 13 deletions(-)
diff --git a/io/iframe.js b/io/iframe.js
index 6372894..ddabc15 100644
--- a/io/iframe.js
+++ b/io/iframe.js
@@ -357,22 +357,18 @@ dojo.io.iframe = {
var toClean = ioArgs._contentToClean;
for(var i = 0; i < toClean.length; i++) {
var key = toClean[i];
- if(dojo.isSafari < 3){
- //In Safari (at least 2.0.3), can't use form[key] syntax to find the node,
- //for nodes that were dynamically added.
- for(var j = 0; j < fNode.childNodes.length; j++){
- var chNode = fNode.childNodes[j];
- if(chNode.name == key){
- dojo.destroy(chNode);
- break;
- }
+ //Need to cycle over all nodes since we may have added
+ //an array value which means that more than one node could
+ //have the same .name value.
+ for(var j = 0; j < fNode.childNodes.length; j++){
+ var chNode = fNode.childNodes[j];
+ if(chNode.name == key){
+ dojo.destroy(chNode);
+ break;
}
- }else{
- dojo.destroy(fNode[key]);
- fNode[key] = null;
}
}
-
+
// restore original action + target
if(ioArgs["_originalAction"]){
fNode.setAttribute("action", ioArgs._originalAction);
diff --git a/tests/io/iframe.html b/tests/io/iframe.html
index 2393dd3..7e465ad 100644
--- a/tests/io/iframe.html
+++ b/tests/io/iframe.html
@@ -114,6 +114,23 @@
}
});
return d;
+ },
+ function ioIframeContentArray(t){
+ //Tests if an array passed in content causes as an error on cleanup.
+ var d = new doh.Deferred();
+ var td = dojo.io.iframe.send({
+ url: "iframeResponse.text.html",
+ form: "contentArrayTest",
+ content: {"tag": ["value1","value2"]},
+ handle: function(res, ioArgs){
+ if(!(res instanceof Error)){
+ d.callback(true);
+ } else {
+ d.errback(false);
+ }
+ }
+ });
+ return d;
}
]
);
@@ -141,5 +158,7 @@ dojo.addOnLoad(function(){
</head>
<body>
+ <form id="contentArrayTest" method="get" enctype="multipart/form-data">
+ </form>
</body>
</html>
--
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