<?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>79417</bug_id>
          
          <creation_ts>2012-02-23 16:17:23 -0800</creation_ts>
          <short_desc>Drag image has a background when it shouldn&apos;t</short_desc>
          <delta_ts>2022-07-12 16:56:34 -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 (Intel)</rep_platform>
          <op_sys>OS X 10.7</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>1</everconfirmed>
          <reporter name="Richard York">richard</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>davidbarr</cc>
    
    <cc>enrica</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>563634</commentid>
    <comment_count>0</comment_count>
      <attachid>128587</attachid>
    <who name="Richard York">richard</who>
    <bug_when>2012-02-23 16:17:23 -0800</bug_when>
    <thetext>Created attachment 128587
Drag image with white background.

In the attached reduced test case, when a draggable element appears inside of a positioned element, it retains a semi-opaque white background that is impossible to remove or change in any way.  In fact, when you set a background with -webkit-drag, it appears that the -webkit-drag pseudo-element is contained within a parent element, because when you specify a background on -webkit-drag, it appears, but it appears inside of the outer white background.

To work-around, if you add the declarations width: 100% and height: 100% to body, html, the white background disappears from the drag image.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>564672</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-02-24 14:58:43 -0800</bug_when>
    <thetext>Testing in Safari on Mac, the resulting behavior looks pretty nice. Is this a significant problem?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>564740</commentid>
    <comment_count>2</comment_count>
    <who name="Richard York">richard</who>
    <bug_when>2012-02-24 16:16:48 -0800</bug_when>
    <thetext>It&apos;s a bug, it should be fixed, in my opinion.

It doesn&apos;t look nice at all when you&apos;re working in a situation where you don&apos;t want it.  My test case doesn&apos;t represent a great many diverse use scenarios when it comes to drag and drop.

Consider situations where you have something like a file icon in the Mac Finder, where you have an icon at the top and the text label below.  With this bug, recreating that in a browser, the browser puts a big, ugly, semi-opaque square white box around the icon and the label, and you have no obvious way to get rid of it.

I took me hours to figure out why there was a background on the drag image.  When I originally observed the problem it was in a much more complicated web application, and I had no idea where it was coming from, I thought the webkit devs intentionally put the ugly white box in there.  On a hunch, however, I compared my app to another one implementing drag and drop and observed the other app didn&apos;t have the ugly white box.

So I went about the tedious process of slowly eliminating various bits of styles until I had isolated the issue.

There is a work-around, and I was lucky to discover that work-around fairly quickly.

These are the kind of things that make web development a nightmare.  It is undocumented, unexpected behavior, and I can&apos;t imagine that the scenario of implementing drag and drop inside of a positioned element is really so fringe as to justify not addressing the issue.

I certainly don&apos;t think it&apos;s a high priority issue in any way, but yes, I believe very strongly it is something that should be fixed.

Thank-you for your time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>648797</commentid>
    <comment_count>3</comment_count>
    <who name="David Barr">davidbarr</who>
    <bug_when>2012-06-13 21:57:11 -0700</bug_when>
    <thetext>Confirmed with attached reproduction.

Google Chrome: 21.0.1173.0 (Official Build 141861) canary
OS: Mac OS X
WebKit: 537.1 (@120155)

WebKit Nightly Version 5.1.7 (6534.57.2, r120264)

Given the nature of the workaround, this is almost certainly a bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1882753</commentid>
    <comment_count>4</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-07-12 16:56:34 -0700</bug_when>
    <thetext>Drag background looks transparent in Safari 15.5.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>128587</attachid>
            <date>2012-02-23 16:17:23 -0800</date>
            <delta_ts>2012-02-23 16:17:23 -0800</delta_ts>
            <desc>Drag image with white background.</desc>
            <filename>dragImage.html</filename>
            <type>text/html</type>
            <size>886</size>
            <attacher name="Richard York">richard</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUw+CjxodG1sIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hodG1s
JyB4bWw6bGFuZz0nZW4tdXMnPgogICAgPGhlYWQ+CiAgICAgICAgPHRpdGxlPkRyYWcgSW1hZ2Ug
QmFja2dyb3VuZDwvdGl0bGU+CiAgICAgICAgPHN0eWxlIHR5cGU9J3RleHQvY3NzJz4KICAgICAg
ICAgICAgLyoKICAgICAgICAgICAgYm9keSwKICAgICAgICAgICAgaHRtbCB7CiAgICAgICAgICAg
ICAgICB3aWR0aDogMTAwJTsKICAgICAgICAgICAgICAgIGhlaWdodDogMTAwJTsKICAgICAgICAg
ICAgfQogICAgICAgICAgICAqLwogICAgICAgICAgICBwIHsKICAgICAgICAgICAgICAgIC13ZWJr
aXQtdXNlci1kcmFnOiBlbGVtZW50OwogICAgICAgICAgICAgICAgLXdlYmtpdC11c2VyLXNlbGVj
dDogbm9uZTsKICAgICAgICAgICAgICAgIHBhZGRpbmc6IDIwcHg7CiAgICAgICAgICAgICAgICBi
b3JkZXI6IDFweCBzb2xpZCBibGFjazsKICAgICAgICAgICAgfQogICAgICAgICAgICBwOi13ZWJr
aXQtZHJhZyB7CiAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kOiBub25lICFpbXBvcnRhbnQ7CiAg
ICAgICAgICAgIH0KICAgICAgICAgICAgZGl2IHsKICAgICAgICAgICAgICAgIHBvc2l0aW9uOiBh
YnNvbHV0ZTsKICAgICAgICAgICAgICAgIHRvcDogMDsKICAgICAgICAgICAgICAgIGxlZnQ6IDA7
CiAgICAgICAgICAgICAgICByaWdodDogMDsKICAgICAgICAgICAgICAgIGJvdHRvbTogMDsKICAg
ICAgICAgICAgfQogICAgICAgIDwvc3R5bGU+CiAgICA8L2hlYWQ+CiAgICA8Ym9keT4KICAgICAg
ICA8ZGl2PgogICAgICAgIDxwPgogICAgICAgICAgICBEcmFnIG1lLgogICAgICAgIDwvcD4KICAg
ICAgICA8L2Rpdj4KICAgIDwvYm9keT4KPC9odG1sPg==
</data>

          </attachment>
      

    </bug>

</bugzilla>