<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>29029</bug_id>
          
          <creation_ts>2009-09-08 06:25:45 -0700</creation_ts>
          <short_desc>:focus pseudo-class and general sibling combinator (selector) not working together</short_desc>
          <delta_ts>2022-07-23 08:26:35 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Simas Toleikis">simast</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>Justin</cc>
    
    <cc>ntim</cc>
    
    <cc>rniwa</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>145327</commentid>
    <comment_count>0</comment_count>
      <attachid>39181</attachid>
    <who name="Simas Toleikis">simast</who>
    <bug_when>2009-09-08 06:25:45 -0700</bug_when>
    <thetext>Created attachment 39181
Simple test case

The following CSS3 selector:

input:focus ~ div {}

.. will not select preceding &lt;div&gt; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>151887</commentid>
    <comment_count>1</comment_count>
    <who name="Justin Mecham">Justin</who>
    <bug_when>2009-10-02 10:38:29 -0700</bug_when>
    <thetext>I have seen this behavior in Safari 4.0.3 (6531.9) on Mac OS X (10.6.1) as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>311287</commentid>
    <comment_count>2</comment_count>
      <attachid>74352</attachid>
    <who name="Chris T.">DCstewieG</who>
    <bug_when>2010-11-18 21:37:05 -0800</bug_when>
    <thetext>Created attachment 74352
More test cases

I&apos;ve also found issue with multiple &quot;next sibling&quot; selectors, input:focus + div + div has no effect. When comparing my test case to the existing &quot;Simple Test Case&quot;, 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886217</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-23 08:03:01 -0700</bug_when>
    <thetext>I am unable to reproduce this bug in Safari 15.6 on macOS 12.5 using both test cases and it matches with all other browsers (Chrome Canary 106 and Firefox Nightly 104) and on input, do same as expected results. I think it was fixed along the way and this can be marked as RESOLVED CONFIGURATION CHANGED. Thanks!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>39181</attachid>
            <date>2009-09-08 06:25:45 -0700</date>
            <delta_ts>2009-09-08 06:25:45 -0700</delta_ts>
            <desc>Simple test case</desc>
            <filename>focus-bug.htm</filename>
            <type>text/html</type>
            <size>330</size>
            <attacher name="Simas Toleikis">simast</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCgk8aGVhZD4NCgkJPHRpdGxlPkJVRzogOmZvY3VzIGFu
ZCBnZW5lcmFsIHNpYmxpbmcgY29tYmluYXRvcjwvdGl0bGU+DQoJCTxzdHlsZSB0eXBlPSJ0ZXh0
L2NzcyI+DQoJCQ0KCQlpbnB1dDpmb2N1cyB+IGRpdiB7DQoJCQliYWNrZ3JvdW5kLWNvbG9yOiBn
cmVlbjsNCgkJfQ0KCQkNCgkJPC9zdHlsZT4NCgk8L2hlYWQ+DQoJPGJvZHk+DQoJCTxpbnB1dCB0
eXBlPSJ0ZXh0IiB2YWx1ZT0iIiAvPg0KCQk8ZGl2PkknbSBzdXBwb3NlZCB0byBiZSBncmVlbiB3
aGVuIGlucHV0IGhhcyBmb2N1cy48L2Rpdj4NCgk8L2JvZHk+DQo8L2h0bWw+
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>74352</attachid>
            <date>2010-11-18 21:37:05 -0800</date>
            <delta_ts>2010-11-18 21:37:05 -0800</delta_ts>
            <desc>More test cases</desc>
            <filename>Focus plus sibling selector test.html</filename>
            <type>text/html</type>
            <size>846</size>
            <attacher name="Chris T.">DCstewieG</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KPHRpdGxlPldlYktpdCBCdWcgMjkwMjkgVGVz
dCBDYXNlPC90aXRsZT4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KRElWIERJViB7CglkaXNwbGF5
OiBibG9jazsKCWhlaWdodDogMTAwcHg7Cglib3JkZXI6IDJweCBzb2xpZCBibGFjazsKfQoKI2Zp
cnN0OmZvY3VzIHsKCWJhY2tncm91bmQtY29sb3I6IHllbGxvdzsKfQoKI2ZpcnN0OmZvY3VzIH4g
RElWIHsKCWJhY2tncm91bmQtY29sb3I6IGdyZWVuOwp9CgovKiBJZiB0aGlzIHJ1bGUgaXMgY29t
bWVudGVkIG91dCBvciByZW1vdmVkLCB0aGUgcHJldmlvdXMgcnVsZSB3aWxsIGhhdmUgbm8gZWZm
ZWN0ICovCiNmaXJzdDpmb2N1cyArIERJViArIERJViB7CgliYWNrZ3JvdW5kLWNvbG9yOiBibHVl
Owp9CgojZml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