saarze / base2

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

getAttribute sometimes returns attribute from other element #109

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Use this HTML page on MSIE

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html>
<head>
<title>base2 Element.getAttribute test</title>
<script type="text/javascript"
src="http://base2.googlecode.com/svn/trunk/lib/base2-dom-fp.js"></script>
</head>
<body>
  <ul>
    <li><a href="#one">one</a></li>
    <li><a href="#two">two</a></li>
  </ul>
</body>
<script>
base2.JavaScript.bind(window);
base2.DOM.bind(document);
var x = document.querySelectorAll("ul > li > a");
var elt = x.item(1);
alert(elt.getAttribute("href"));
</script>
</html>

What is the expected output? What do you see instead?
Should alert "#two". 
Actually alerts "#one".

What version of the product are you using? On what operating system?
version-1.0 and current on Internet-Explorer

Other information:
May also affect setAttribute / removeAttribute.

Original issue reported on code.google.com by shogu...@gmail.com on 12 May 2009 at 6:39

GoogleCodeExporter commented 8 years ago
Yikes! What a horrible bug.

Original comment by dean.edw...@gmail.com on 21 Jun 2009 at 4:03

GoogleCodeExporter commented 8 years ago

Original comment by dean.edw...@gmail.com on 7 Jul 2009 at 5:00

GoogleCodeExporter commented 8 years ago
The test page ran fine for me in IE 8, 7, 6 and 5.5. My IE 6 and 5.5 are part 
of a 
Multiple IE install and I don't know if that could affect things.

Original comment by mr.fyed@gmail.com on 31 Oct 2009 at 3:17

GoogleCodeExporter commented 8 years ago
Yes it's fixed in the trunk for version 1.1.

Version 1.1 has not been finally released yet.

Original comment by dean.edw...@gmail.com on 31 Oct 2009 at 4:02