Bug Tracker

Opened 13 years ago

Closed 13 years ago

#6653 closed bug (worksforme)

element selector of v1.4.2 found extra (none-exist) elements in firefox v3.6.3

Reported by: koqiui Owned by:
Priority: Milestone: 1.4.2
Component: selector Version: 1.4.2
Keywords: found extra elements Cc:
Blocked by: Blocking:

Description

Given the following code:

<button>

echo selector result

</button> <div>

DIV1

</div> <div>

DIV2

</div> <span>SPAN</span>

<script language="JavaScript" type="text/javascript">

$(function(){

------------ $("button").click(function(){

alert($("div").length); $("div").each(function(i, elem){

alert((i + 1) + " - " + $(this).text());

});

}); ------------

});

</script>


the result of found elements count is 3 in FF (works ok in IE : count is 2).

Attachments (2)

Capture-6653.PNG (93.1 KB) - added by dmethvin 13 years ago.
Screen shot of Firebug showing div
test-6653.html (393 bytes) - added by dmethvin 13 years ago.
Test case for #6653

Download all attachments as: .zip

Change History (3)

Changed 13 years ago by dmethvin

Attachment: Capture-6653.PNG added

Screen shot of Firebug showing div

Changed 13 years ago by dmethvin

Attachment: test-6653.html added

Test case for #6653

comment:1 Changed 13 years ago by dmethvin

Resolution: worksforme
Status: newclosed

This seems to be an artifact of Firebug, which seems to be injecting a div into the DOM. See the attached test case and screen shot.

Note: See TracTickets for help on using tickets.