<?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>18026</bug_id>
          
          <creation_ts>2008-03-23 13:59:35 -0700</creation_ts>
          <short_desc>CSS3 Selector Test: combination of hover and general sibling selector fails in Webkit</short_desc>
          <delta_ts>2022-01-28 05:10:18 -0800</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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc>http://disruptive-innovations.com/zoo/css3tests/selectorTest.html#target</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>12520</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Blaut">webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>allan.jensen</cc>
    
    <cc>andyearnshaw</cc>
    
    <cc>dkwestbr</cc>
    
    <cc>jamyg88</cc>
    
    <cc>Justin</cc>
    
    <cc>koivisto</cc>
    
    <cc>yusukes</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>74878</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-03-23 13:59:35 -0700</bug_when>
    <thetext>The CSS3 selectors test suite check this particular case:

 .tilda .t1:hover ~ .unitTest { background-color: red; }

It fails in Webkit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74879</commentid>
    <comment_count>1</comment_count>
      <attachid>19986</attachid>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-03-23 13:59:57 -0700</bug_when>
    <thetext>Created attachment 19986
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>134855</commentid>
    <comment_count>2</comment_count>
    <who name="Yusuke Sato">yusukes</who>
    <bug_when>2009-07-27 01:00:10 -0700</bug_when>
    <thetext>The patch I attached on Bug 18027 (hover-adjacent-v1) also fixes this bug.
https://bugs.webkit.org/show_bug.cgi?id=18027

--Yusuke</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>348276</commentid>
    <comment_count>3</comment_count>
    <who name="Andy E">andyearnshaw</who>
    <bug_when>2011-02-09 09:06:48 -0800</bug_when>
    <thetext>Yasuke:

I believe the patch you attached on Bug 18027 doesn&apos;t fix this problem fully.  I was helping a developer with a demo that involves highlighting elements that are floated to the right.  As you move from the left element through the other elements, they each remain highlighted up to the currently hovered element - which is correct behavior.  However, when moving the mouse away from all the elements the highlight should be removed completely but it isn&apos;t.  Also, hovering over the elements individually doesn&apos;t achieve the desired effect.

The demo I was working on is located at http://jsfiddle.net/H9Rn6/.  The code is as follows:

HTML

    &lt;div id=&quot;container&quot;&gt;
        &lt;div class=&quot;iconFavorite&quot;&gt;&lt;/div&gt;
        &lt;div class=&quot;iconFavorite&quot;&gt;&lt;/div&gt;
        &lt;div class=&quot;iconFavorite&quot;&gt;&lt;/div&gt;
        &lt;div class=&quot;iconFavorite&quot;&gt;&lt;/div&gt;
        &lt;div class=&quot;iconFavorite&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;

CSS

    .iconFavorite:hover, .iconFavorite:hover ~ div {
        background-image: url(http://www.custom52.com/Images/star_icon.gif);
    }
    
    .iconFavorite{
        float: right;
        background: url(http://t3.gstatic.com/images?q=tbn:ANd9GcRk4Mbns-pCrOXWL5WIiY-iy6syBtYLKzJKc5GSa9Ak9RGM_uDbEg&amp;t=1) no-repeat;
        width: 16px;
        height: 16px;
        border: none;
        display:inline-block;
    }

Internet Explorer 7+, Firefox 2+ and Opera 9+ all exhibit the correct behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>348298</commentid>
    <comment_count>4</comment_count>
    <who name="Andy E">andyearnshaw</who>
    <bug_when>2011-02-09 09:23:12 -0800</bug_when>
    <thetext>Furthermore, it seems that the ~ adjacent sibling selector is buggy when used dynamically in general.  Using my previous example to apply the hover effect using JavaScript -- whilst retaining the ~ selector for adjacent siblings -- results in styles not being applied to the adjacent siblings.

http://jsfiddle.net/H9Rn6/3/

Still working as expected in non-WebKit browsers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>400088</commentid>
    <comment_count>5</comment_count>
    <who name="Dave">dkwestbr</who>
    <bug_when>2011-05-07 10:52:30 -0700</bug_when>
    <thetext>THIS IS STILL AN ISSUE:

To reproduce:
http://jsfiddle.net/uNZSX/14/

To get a more detailed explanation:
http://stackoverflow.com/questions/5061509/why-doesnt-this-css-selector-work-ahover-span</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>443478</commentid>
    <comment_count>6</comment_count>
    <who name="Jamy">jamyg88</who>
    <bug_when>2011-07-28 07:25:56 -0700</bug_when>
    <thetext>When will this be solved? Even IE7 can do this properly... 
http://jsfiddle.net/jamygolden/r45tV/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1756032</commentid>
    <comment_count>7</comment_count>
    <who name="Jamy">jamyg88</who>
    <bug_when>2021-05-02 02:42:21 -0700</bug_when>
    <thetext>This was fixed long ago and can be closed :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1834899</commentid>
    <comment_count>8</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2022-01-28 05:10:18 -0800</bug_when>
    <thetext>👍</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>19986</attachid>
            <date>2008-03-23 13:59:57 -0700</date>
            <delta_ts>2008-03-23 13:59:57 -0700</delta_ts>
            <desc>test case</desc>
            <filename>test-case</filename>
            <type>text/html</type>
            <size>402</size>
            <attacher name="Robert Blaut">webkit</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CiAgICBkaXYgeyBib3JkZXI6
IDFweCBzb2xpZDsgaGVpZ2h0OiAxZW07IG1hcmdpbi1ib3R0b206MC41ZW19CiAgICAudGVzdCB7
IGJhY2tncm91bmQtY29sb3I6IHdoaXRlOyB9CiAgICAudGVzdCB+IGRpdiB7IGJhY2tncm91bmQt
Y29sb3I6IGJsdWU7IH0KICAgIC50ZXN0OmhvdmVyIH4gZGl2IHsgYmFja2dyb3VuZC1jb2xvcjog
bGltZTsgfQo8L3N0eWxlPgo8ZGl2IGNsYXNzPSJ0ZXN0Ij50aGUgdGhyZWUgbGFzdCBkaXZzIHNo
b3VsZCBiZSBibHVlIGFuZCBiZWNvbWUgZ3JlZW4gd2hlbiB0aGUgcG9pbnRlciBob3ZlcnMgb3Zl
ciB0aGUgd2hpdGUgZGl2PC9kaXY+CjxkaXY+PC9kaXY+CjxkaXY+PC9kaXY+CjxkaXY+PC9kaXY+
Cgog
</data>

          </attachment>
      

    </bug>

</bugzilla>