[Pkg-javascript-commits] [dojo] 20/88: Fix position getting set on form in DOM for 1.8. refs #15939 !strict

David Prévot taffit at moszumanska.debian.org
Thu Aug 21 17:39:32 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 7e5e2d02734d63531dadac8771437cb7bfd19c5a
Author: Bryan Forbes <bryan at reigndropsfall.net>
Date:   Wed Sep 12 14:45:01 2012 +0000

    Fix position getting set on form in DOM for 1.8. refs #15939 !strict
    
    git-svn-id: http://svn.dojotoolkit.org/src/branches/1.8/dojo@29648 560b804f-0ae3-0310-86f3-f6aa0a117693
---
 request/iframe.js         | 4 +++-
 tests/request/iframe.html | 7 ++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/request/iframe.js b/request/iframe.js
index 5beb1bf..31034d4 100644
--- a/request/iframe.js
+++ b/request/iframe.js
@@ -176,7 +176,9 @@ define([
 			if(formNode){
 				if(!dfd._legacy){
 					var parentNode = formNode;
-					while(parentNode = parentNode.parentNode && parentNode !== win.doc.documentElement){}
+					do{
+						parentNode = parentNode.parentNode;
+					}while(parentNode !== win.doc.documentElement);
 
 					// Append the form node or some browsers won't work
 					if(!parentNode){
diff --git a/tests/request/iframe.html b/tests/request/iframe.html
index 50ecaff..b01f6c7 100644
--- a/tests/request/iframe.html
+++ b/tests/request/iframe.html
@@ -13,7 +13,7 @@
 		</script>
 		<script type="text/javascript" src="../../dojo.js"></script>
 		<script type="text/javascript">
-			require(["doh", "dojo/request/iframe", "dojo/domReady!"], function(doh, iframe){
+			require(["doh", "dojo/request/iframe", "dojo/dom", "dojo/domReady!"], function(doh, iframe, dom){
 				doh.register("dojo/request/iframe", [
 					function ioIframeGetText(t){
 						var d = new doh.Deferred();
@@ -146,6 +146,11 @@
 							t.is("json", data.query.type);
 							t.is("value2", data.post.tag);
 							t.is("42", data.post.size);
+
+							/* Test to make sure the form still exists and it hasn't moved */
+							var form = dom.byId("contentArrayTest");
+							t.t(form);
+							t.isNot("absolute", dom.byId("contentArrayTest").style.position);
 						}));
 						return d;
 					},

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