-
14 Jul 2010 6:38 AM #1
[CLOSED] Ext.query("*[class!=bar]") returns all nodes even with no "class" attribute
[CLOSED] Ext.query("*[class!=bar]") returns all nodes even with no "class" attribute
In DomQuery documentation, it's told that:
E[foo!=bar] has an attribute "foo" that does not equal "bar",
but Ext.query("*[class!=bar]") returns ALL DOM elements having not class="bar", even those that
do not have any "class" attribute.
Result also contains <html>, <head>, <title>, <meta>, <link>, <style>, <script> elements,
and all dom elements with no class attribute.
It is also true for all E[foo!=bar] combinations (E not only '*', foo all correct and incorrect
attribute names and any bar value).
-
14 Jul 2010 9:15 AM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
Technically the behavior is correct, though it may not be what you're expecting. The biggest problem is that changing this behavior may break existing applications which rely on it.
-
14 Jul 2010 10:56 AM #3
Then if it's correct behaviour, the correction has to be made to DomQuery API documentation.
It would also be good to add DomQuery attribute selector that'll be appropriate to now's documenation (has an attribute "foo" that does not equal "bar")
-
14 Jul 2010 11:25 AM #4Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
I have updated that documentation to make it clearer. As far as adding a new selector, we really want to follow the QSA standards that are out there.
-
14 Jul 2010 11:43 AM #5
Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide
You found a bug! We've classified it as
a bug in our system.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
Similar Threads
-
data query within my groovy class
By mustanglover in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 18 Mar 2009, 8:16 AM -
GXT overwrites body class attribute
By korebantic in forum Ext GWT: Bugs (1.x)Replies: 0Last Post: 16 Jan 2009, 7:52 AM -
DOM query on :visited pseudo-class
By steve.kerrison in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 24 Aug 2008, 11:04 AM -
[CLOSED] class attribute doesn't work for SPAN when used with HTML as a ToolBarItem
By plitvak in forum Ext GWT: Bugs (1.x)Replies: 1Last Post: 18 Jun 2008, 1:15 PM


Reply With Quote