Bug Tracker

Modify

Ticket #6699 (closed bug: worksforme)

Opened 3 years ago

Last modified 3 years ago

Selector context issue on $("tag[attrname=value]", ctxnode)

Reported by: brutuscat Owned by:
Priority: low Milestone:
Component: selector Version: 1.4.2
Keywords: selector, context, attribute Cc: mauroasprea@…
Blocking: Blocked by:

Description

Hi guys, I am having issues selecting objects using the equals attribute selector within contexts.

I am pasting the output of my Chrome JS console (v - 5.0.375.70)

So the context and html of my context it:

$("select[multiple=multiple]", $("#ui-tabs-2")[0]).context
<div id=​"ui-tabs-2" class=​"ui-tabs-panel ui-widget-content ui-corner-bottom">​
<div id=​"items_panel">​…​</div>​
<div class=​"search_panel">​
<p>​1 - Search for products, add it to your list and get your Product Feed.​</p>​
<form id=​"padre" class=​"ajax-form" methdo=​"POST" action=​"/​index/​search/​net/​zanox/​format/​html">​
<div id=​"search">​…​</div>​
<div id=​"selects">​
<select id=​"region" name=​"region">​…​</select>​
<select name=​"programs[]​" multiple=​"multiple" size=​"5" style=​"width:​30em">​
<option value=​"660">​ zanox AdServer - 660​</option>​
<option value=​"5178">​ Vodafone ES - 5178​</option>​
</select>​
<select id=​"category" name=​"category">​…​</select>​
<label for=​"adspace">​AdSpace​</label>​
<select id=​"adspace" name=​"adspace">​…​</select>​
</div>​
<input name=​"items" value=​"15" type=​"hidden">​
<input name=​"page" value=​"0" type=​"hidden">​
<input name=​"total" value=​"0" type=​"hidden">​
</form>​
<div id=​"results">​</div>​
<div id=​"pagination">​</div>​
</div>​
</div>​

And the query that is FAILING:

$("select[multiple=multiple]", $("#ui-tabs-2")[0]).length
0

Without the context it get it right:

$("select[multiple=multiple]").length
1

And just to be sure the context is unique:

$("#ui-tabs-2").length
1

This seems a bug.... What would you need to further testing?

Regards! Mauro

Change History

comment:1 Changed 3 years ago by rwaldron

  • Priority set to low
  • Status changed from new to closed
  • Resolution set to worksforme
  • Milestone 1.4.2 deleted

Issue no longer exists;  http://jsfiddle.net/rwaldron/QUFqr/1/

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.