Attributes filters not always working when using a context

Attributes filters not always working when using a context


Hello all,
I realized attributes filters do not work when a context is passed in
some cases :
$(span[style*='font-size: x-small'] > strong, context);
Simpler selectors work (span[attribute] e.g.), so i came to the
conclusion that it is the combination of a complex attribute filter
and a context which is (sometimes) buggy. I also verified it is not
because of changes in the DOM (the node exists and has the attribute).
I am not sure why precisely it does not work in my case, but if it can
help, here is the scenario in which this happens :
- I have a div with some markup in it.
- I pass the div node as a reference to a function which traverses the
div according to some selectors (some simple, and some more complex).
Simple selectors work fine, but selectors with attribute filters do
not. If i remove the context, complex filters work fine.
Is this a known bug ? Any idea ?
In my case I found a workaround, but i thought sharing this with you
might be useful.
Thank you !