<?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>73068</bug_id>
          
          <creation_ts>2011-11-23 21:03:34 -0800</creation_ts>
          <short_desc>css :hover doesn&apos;t work on initially onscreen absolute positioned divs with negative z-index</short_desc>
          <delta_ts>2022-07-11 16:47: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>UI Events</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mike Lawther">mikelawther</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>508603</commentid>
    <comment_count>0</comment_count>
    <who name="Mike Lawther">mikelawther</who>
    <bug_when>2011-11-23 21:03:34 -0800</bug_when>
    <thetext>As reported at http://code.google.com/p/chromium/issues/detail?id=83533;

An absolutely positioned div with a negative zindex that is initially visible without scrolling doesn&apos;t have hover applied to it.

----------
&lt;style&gt;
div {
    width: 50px;
    height: 50px;
    position: absolute;
    background-color: blue;
    z-index: -1;
}

div:hover {
	background-color:green;
}
&lt;/style&gt;   

&lt;div style=&quot;top: 200px;&quot;&gt;&lt;/div&gt;
&lt;div style=&quot;top: 400px;&quot;&gt;&lt;/div&gt;
&lt;div style=&quot;top: 600px;&quot;&gt;&lt;/div&gt;
&lt;div style=&quot;top: 800px;&quot;&gt;&lt;/div&gt;
------------

In the above testcase, any div that is initially offscreen (ie requiring scrolling) will correctly turn green on hover. The ones that are initially onscreen don&apos;t.

Note you need to load this directly - pasting into something like jsfiddle.net does not repro the problem.

Browsers Tested (MacOS):
 - WebKit Nightly r101106: BAD
 - Firefox 8.0 : OK
 - Opera 11.52: OK</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>508873</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-11-24 12:52:09 -0800</bug_when>
    <thetext>See also: bug 25943.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>510022</commentid>
    <comment_count>2</comment_count>
      <attachid>116794</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-11-28 11:41:32 -0800</bug_when>
    <thetext>Created attachment 116794
Testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1882224</commentid>
    <comment_count>3</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-07-11 16:47:48 -0700</bug_when>
    <thetext>This continues to be an issue in 2022. Blink and WebKit have the same (broken) behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1882225</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-07-11 16:47:58 -0700</bug_when>
    <thetext>&lt;rdar://problem/96850674&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>116794</attachid>
            <date>2011-11-28 11:41:32 -0800</date>
            <delta_ts>2011-11-28 11:41:32 -0800</delta_ts>
            <desc>Testcase</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>303</size>
            <attacher name="Simon Fraser (smfr)">simon.fraser</attacher>
            
              <data encoding="base64">PHN0eWxlPgpkaXYgewogICAgd2lkdGg6IDUwcHg7CiAgICBoZWlnaHQ6IDUwcHg7CiAgICBwb3Np
dGlvbjogYWJzb2x1dGU7CiAgICBiYWNrZ3JvdW5kLWNvbG9yOiBibHVlOwogICAgei1pbmRleDog
LTE7Cn0KCmRpdjpob3ZlciB7CiAgICBiYWNrZ3JvdW5kLWNvbG9yOmdyZWVuOwp9Cjwvc3R5bGU+
ICAgCgo8ZGl2IHN0eWxlPSJ0b3A6IDIwMHB4OyI+PC9kaXY+CjxkaXYgc3R5bGU9InRvcDogNDAw
cHg7Ij48L2Rpdj4KPGRpdiBzdHlsZT0idG9wOiA2MDBweDsiPjwvZGl2Pgo8ZGl2IHN0eWxlPSJ0
b3A6IDgwMHB4OyI+PC9kaXY+
</data>

          </attachment>
      

    </bug>

</bugzilla>