Side navigation
#12237 closed bug (fixed)
Opened August 10, 2012 07:59AM UTC
Closed August 24, 2012 09:44PM UTC
Having child selector and multiple :not with :visible does not work any more
Reported by: | r.osenkonstantinov@gmail.com | Owned by: | timmywil |
---|---|---|---|
Priority: | low | Milestone: | 1.8.1 |
Component: | selector | Version: | 1.8.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Having selector similar to the following does not work after update to 1.8.0:
"tr:not(.foo):visible > td:not(.bar)"
Here you can find a simple repro of the issue:
Attachments (0)
Change History (11)
Changed August 10, 2012 12:55PM UTC by comment:1
Changed August 10, 2012 01:01PM UTC by comment:2
status: | new → open |
---|
Changed August 10, 2012 01:01PM UTC by comment:3
component: | unfiled → selector |
---|
Changed August 10, 2012 03:18PM UTC by comment:5
milestone: | None → 1.8.1 |
---|---|
owner: | → timmywil |
priority: | undecided → low |
status: | open → assigned |
We can address both of these selectors with one ticket.
Test from the other ticket: http://jsbin.com/orohus/1
I don't think this is a duplicate of #12205. It looks like an issue with :not's argument with respect to parens.
Changed August 10, 2012 03:29PM UTC by comment:6
@gibson042:
I have a clearer understanding of what you were trying to say about the regex vs. context-free grammar issue (got a whole bunch of flashbacks from CS classes ;)), but there are several ways that Sizzle should treat pseudo arguments that we are not doing. They are all minor, but I think we can do it (including support for this selector). I'm going to take a pass and see if I come up with something similar to what you've already done, just to attempt tackling from another direction. One of my goals is to make sure that tokenize is only called at most once in any given codepath.
Changed August 10, 2012 04:58PM UTC by comment:7
I'm firmly with the noble goal of one tokenize
per selector (well, probably at minimum one tokenize
per selector plus one per :not
—if not one per pseudo), but hate the idea of supporting something as ambiguous as :contains((unquoted) parentheses)
, in large part because it makes parsing so brittle (e.g., is :contains(1))
equivalent to :contains("1)")
or (''ERROR!!'') :contains("1"))
?).
Either way, https://github.com/jquery/sizzle/pull/139 is probably a good start and I think rselector
is doomed. Please keep me updated so we can hash it out before it gets committed to master.
''WikiFormatting error deliberately left in for ironic effect:
''
Changed August 22, 2012 06:06PM UTC by comment:10
#12375 is a duplicate of this ticket.
Confirmed. I suspect this is a duplicate of #12205, and at any rate it would be fixed by that pull: https://github.com/jquery/sizzle/pull/139