Bug 29029 - :focus pseudo-class and general sibling combinator (selector) not working together
Summary: :focus pseudo-class and general sibling combinator (selector) not working tog...
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-08 06:25 PDT by Simas Toleikis
Modified: 2010-11-18 21:37 PST (History)
1 user (show)

See Also:


Attachments
Simple test case (330 bytes, text/html)
2009-09-08 06:25 PDT, Simas Toleikis
no flags Details
More test cases (846 bytes, text/html)
2010-11-18 21:37 PST, Chris T.
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simas Toleikis 2009-09-08 06:25:45 PDT
Created attachment 39181 [details]
Simple test case

The following CSS3 selector:

input:focus ~ div {}

.. will not select preceding <div> element(s).

Notes:

- removing :focus works fine, so it must be a bug with combination of :focus and ~
- the following selector works fine: input:focus + div
- Gecko/Presto behaves as expected
Comment 1 Justin Mecham 2009-10-02 10:38:29 PDT
I have seen this behavior in Safari 4.0.3 (6531.9) on Mac OS X (10.6.1) as well.
Comment 2 Chris T. 2010-11-18 21:37:05 PST
Created attachment 74352 [details]
More test cases

I've also found issue with multiple "next sibling" selectors, input:focus + div + div has no effect. When comparing my test case to the existing "Simple Test Case", found that having said rule after a copy of the rule in the other test case makes the latter work. Removing it breaks it (commented in my test case). Testing in Safari 5.0.2 Mac.