ChavezArquitectos / curvycorners

Automatically exported from code.google.com/p/curvycorners
0 stars 0 forks source link

curvyCorners(settings, "div.dialogBox h1") fail if multiple div.dialogBox object in the page #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create multiple <div class="dialogBox"> <h1>hello</h1></div> on the same
page
2. round them

What is the expected output? What do you see instead?

I get an error 

Error: node.getElementsByTagName is not a function
Source File: /curvycorners.src.js
Line: 1270     els = node.getElementsByTagName(tag);

This is because node is a list of object instead of an object 

What version of the product are you using? On what operating system?
The 2.0.4

Please provide any additional information below.

the path maybe :-)

--- curvycorners.src.js.orig    2009-08-14 13:49:20.000000000 +0200
+++ curvycorners.src.js 2009-08-14 13:49:51.000000000 +0200
@@ -308,7 +308,7 @@
           else {
             var encloser = curvyCorners.getElementsByClass(argbits[0]);
             for (j = 0; j < encloser.length; ++j) {
-              boxCol =
boxCol.concat(curvyCorners.getElementsByClass(argbits[1], encloser));
+              boxCol =
boxCol.concat(curvyCorners.getElementsByClass(argbits[1], encloser[j]));
             }
           }
         //break;
@@ -1370,4 +1370,4 @@
   if (curvyBrowser.isOp)
     document.addEventListener("DOMContentLoaded", curvyCorners.init, false);
   else addEvent(window, 'load', curvyCorners.init, false);
-}
\ No newline at end of file
+}

Thanks for your work

PS: In fact I'm not sure the problem will not popup if I'had only one
div.dialogBox but just regarding the patch is enough to see something is
wrong with the original code

Original issue reported on code.google.com by alain.sp...@gmail.com on 14 Aug 2009 at 12:00

GoogleCodeExporter commented 8 years ago
By a strange stroke of fate, this very bug was fixed just hours before this 
report, 
SVN r147. Thank you anyway for kindly looking into it and suggesting the 
correct 
solution!

Original comment by c.1%smit...@gtempaccount.com on 14 Aug 2009 at 10:26