<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>23232</bug_id>
          
          <creation_ts>2013-09-13 08:45:31 +0000</creation_ts>
          <short_desc>clipboardData.clearData() should not clear clipboard</short_desc>
          <delta_ts>2014-01-23 23:24:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Clipboard API and events</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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="Hallvord R. M. Steen">hsteen</reporter>
          <assigned_to name="Hallvord R. M. Steen">hsteen</assigned_to>
          <cc>james.m.greene</cc>
    
    <cc>mike</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>93336</commentid>
    <comment_count>0</comment_count>
    <who name="Hallvord R. M. Steen">hsteen</who>
    <bug_when>2013-09-13 08:45:31 +0000</bug_when>
    <thetext>&quot;Neither Firefox nor Chrome let you clear the contents of the clipboard by calling event.clipboardData.clearData(). IMO, we should update the spec to
reflect this.&quot;

http://lists.w3.org/Archives/Public/public-webapps/2013JulSep/0064.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94872</commentid>
    <comment_count>1</comment_count>
    <who name="James M. Greene">james.m.greene</who>
    <bug_when>2013-10-17 04:32:25 +0000</bug_when>
    <thetext>Why shouldn&apos;t `clearData` be allowed to clear the clipboard during a synchronous flow of a copy event?  This is vitally important in making sensible data sets for copying.  Without it, things can get VERY weird for the user.

For example:
 1. The user&apos;s clipboard holds existing HTML data in the HTML clipboard segment.
 2. The user comes to your web application and invokes your copy functionality.
 3. Your copy only adds plain text data to the text clipboard segment but cannot clear the other segments (e.g. HTML).
 4. The user opens a rich text editor (e.g. Microsoft Word).
 5. The user tries to paste the text they just got from your web app into Word.
 6. The pasted content would be the previously existing HTML data.


Not good!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94877</commentid>
    <comment_count>2</comment_count>
    <who name="Hallvord R. M. Steen">hsteen</who>
    <bug_when>2013-10-17 09:07:53 +0000</bug_when>
    <thetext>I suppose the implementation should clear the clipboard (in that sense of &quot;clear&quot;) automatically, i.e. ensure that current clipboard contents are *replaced* entirely by the new content. I would certainly not push this responsibility onto script authors - that would let them create an endless amount of apparently random and hard to understand bugs..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94882</commentid>
    <comment_count>3</comment_count>
    <who name="James M. Greene">james.m.greene</who>
    <bug_when>2013-10-17 10:45:40 +0000</bug_when>
    <thetext>I agree with that suggestion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94897</commentid>
    <comment_count>4</comment_count>
    <who name="Hallvord R. M. Steen">hsteen</who>
    <bug_when>2013-10-17 12:50:20 +0000</bug_when>
    <thetext>reported bug 23547 just in case the spec isn&apos;t clear (no pun intended) enough</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98809</commentid>
    <comment_count>5</comment_count>
    <who name="Hallvord R. M. Steen">hsteen</who>
    <bug_when>2014-01-21 01:15:03 +0000</bug_when>
    <thetext>Keeping this functionality is probably a good idea, however the way it currently works seems a bit dodgy - the main use case for this seems to be stuff like apps shutting down and desiring to clear the clipboard because they wrote a lot of content or something semi-secret there. For such use cases, it doesn&apos;t make sense to expose the functionality only inside events.. :-/

As written and summarized this bug is a wontfix though.

Also, I&apos;m not sure if being able to delete specific types from the clipboard is really necessary. We&apos;d be able to simplify things if we dropped that feature..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98967</commentid>
    <comment_count>6</comment_count>
    <who name="James M. Greene">james.m.greene</who>
    <bug_when>2014-01-23 23:24:21 +0000</bug_when>
    <thetext>**shrugs**

None of my personal use cases require me to use `clearData` whatsoever, though I&apos;m fairly certain there are others who do need it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>