<?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>24751</bug_id>
          
          <creation_ts>2009-03-22 14:21:08 -0700</creation_ts>
          <short_desc>Selecting text in element with box-shadow goes too low</short_desc>
          <delta_ts>2022-07-22 21:55: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>PC</rep_platform>
          <op_sys>Windows Vista</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="Wander">simslim</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>rniwa</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>114725</commentid>
    <comment_count>0</comment_count>
    <who name="Wander">simslim</who>
    <bug_when>2009-03-22 14:21:08 -0700</bug_when>
    <thetext>Selecting text in a rotated element normally works fine, but as soon as I give it a bigger shadow, selecting the top lines won&apos;t work anymore.
In the code below, changing the 30px in 20px fixes the problem.
I get the bug in Safari 4 public beta (webkit 528.16) and Chromium build 12245 (webkit 530.4)

&lt;style&gt;
.a{
	-webkit-box-shadow:10px 10px 30px #000;
	-webkit-transform:rotate(10deg);
	margin:20%;
}
&lt;/style&gt;
&lt;div class=&quot;a&quot;&gt;Just some text&lt;br/&gt;Just some text&lt;br/&gt;Just some text&lt;br/&gt;Just some text&lt;/div&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114726</commentid>
    <comment_count>1</comment_count>
    <who name="Wander">simslim</who>
    <bug_when>2009-03-22 14:41:59 -0700</bug_when>
    <thetext>I think I made an error when trying without rotation earlier, now I see it doesnt have anything to do with the rotating, but only with the shadow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886010</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-22 10:30:59 -0700</bug_when>
    <thetext>I am able to reproduce this bug in Safari 15.6 on macOS 12.5 and I have changed the test case slightly (removing rotation) and also in following JSFiddle:

Link - https://jsfiddle.net/ek1m9678/show

Upon text selection - the selection goes beyond border &lt;div&gt; and show across whole viewport, while other browser (Chrome Canary 105 and Firefox Nightly 104) restrict text selection into &lt;div&gt; only.

It might be duplicate bug since I recall testing similar bug before. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886175</commentid>
    <comment_count>3</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-07-22 21:55:58 -0700</bug_when>
    <thetext>Even though the selection rendering differs here because Safari renders selection gap, we can still select the top line so the original bug being reported here has been fixed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>