14 Jul 2010 6:38 AM #1
[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 #2
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 #4
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
By mustanglover in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 18 Mar 2009, 8:16 AM
By korebantic in forum Ext GWT: Bugs (1.x)Replies: 0Last Post: 16 Jan 2009, 7:52 AM
By steve.kerrison in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 24 Aug 2008, 11:04 AM
By plitvak in forum Ext GWT: Bugs (1.x)Replies: 1Last Post: 18 Jun 2008, 1:15 PM