<?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>17976</bug_id>
          
          <creation_ts>2008-03-20 18:08:42 -0700</creation_ts>
          <short_desc>can&apos;t target next sibling element when using :hover pseudo selector and next element combinator</short_desc>
          <delta_ts>2008-03-20 20:42:58 -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>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>9279</dup_id>
          
          <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="M. Dave Auayan">m</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>m</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>74591</commentid>
    <comment_count>0</comment_count>
    <who name="M. Dave Auayan">m</who>
    <bug_when>2008-03-20 18:08:42 -0700</bug_when>
    <thetext>The behavior of using the pseudo selector &quot;:hover&quot; and the next combinator &quot;+&quot; is incorrect. When the hovered element loses focus, the next element still retains the style assigned with the :hover declaration.

Firefox and Internet Explorer 7 behave as expected.

With any luck the following code should help illustrate my point.

&lt;style&gt;
    li:hover{
      background:red;
    }
    
    li:hover + li{
      background:green;
    }

    li a{
      background:grey;
  }

&lt;/style&gt;

&lt;ul&gt;
  &lt;li&gt;first element&lt;/li&gt;
  &lt;li&gt;second element&lt;/li&gt;
  &lt;li&gt;third element&lt;/li&gt;
&lt;/ul&gt;

Upon hovering over the element, the hovered li should display a green background, and the next element should display a red background. These elements don&apos;t actually display a red background unless it was hovered over then moved to a previous element. When it loses :hover, the next element still retains its background color. 

Wow that ended up rather... circuitous.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74600</commentid>
    <comment_count>1</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2008-03-20 20:42:58 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 9279 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>