<?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>11335</bug_id>
          
          <creation_ts>2006-10-17 16:14:37 -0700</creation_ts>
          <short_desc>execCommand(&quot;Paste&quot;) not allowed</short_desc>
          <delta_ts>2026-01-01 14:40:53 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>HTML Editing</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>GoogleBug, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>25486</blocked>
    
    <blocked>7712</blocked>
    
    <blocked>9915</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Petersen">c.petersen87</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dev+webkit</cc>
    
    <cc>frances_c</cc>
    
    <cc>lethalman88</cc>
    
    <cc>webkit</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>52314</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Petersen">c.petersen87</who>
    <bug_when>2006-10-17 16:14:37 -0700</bug_when>
    <thetext>10/17/06 2:53 PM Chris Petersen:
* SUMMARY
I believe this might be a known issue already but filing just in case.

Paste toolbar icon doesn&apos;t function. Text that was copied to the clipboard doesn&apos;t get pasted into the document after I click the paste toolbar icon.

* STEPS TO REPRODUCE
1. With r17089 , login to your Writely account (Google Docs &amp; Spreadsheet)
2. Create a new document
3. Type some text in your document body. Select it all and click the Copy toolbar icon.
4. Now, click the Paste toolbar icon.  Copied text doesn&apos;t get pasted into the document body.

* RESULTS
Copied text should get pasted back into the document body but doesn&apos;t</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52243</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Petersen">c.petersen87</who>
    <bug_when>2006-10-17 16:17:07 -0700</bug_when>
    <thetext>This is filed as &lt;rdar://problem/4788399&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42322</commentid>
    <comment_count>2</comment_count>
    <who name="David Harrison">harrison</who>
    <bug_when>2006-12-12 15:13:34 -0800</bug_when>
    <thetext>Works for me with TOT.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12292</commentid>
    <comment_count>3</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-04-26 16:57:09 -0700</bug_when>
    <thetext>We don&apos;t support the paste command from JavaScript for security reasons. We don&apos;t want a site to be able to sniff the contents of the pasteboard.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10033</commentid>
    <comment_count>4</comment_count>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2007-05-14 15:28:37 -0700</bug_when>
    <thetext>*** Bug 12243 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7859</commentid>
    <comment_count>5</comment_count>
    <who name="">webkit</who>
    <bug_when>2007-06-12 03:37:04 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; We don&apos;t support the paste command from JavaScript for security reasons. We
&gt; don&apos;t want a site to be able to sniff the contents of the pasteboard.
&gt; 

There are web applications, like FCKeditor, where users really expect to have such kinds of features available. What should we do in such cases?

Wouldn&apos;t it be a much better to display &quot;The application is trying to access your clipboard information. Do you want to give access to it?&quot;, holding the execCommand  execution until the user response, returning &quot;true&quot; or &quot;false&quot; if the command has been executed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>169</commentid>
    <comment_count>6</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2007-09-22 03:54:38 -0700</bug_when>
    <thetext>It might be acceptable to allow Paste in response to a user action, but we&apos;d have to consider the security implications.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>162</commentid>
    <comment_count>7</comment_count>
    <who name="">webkit</who>
    <bug_when>2007-09-22 05:32:17 -0700</bug_when>
    <thetext>This is a common problem in all browsers.

I agree that clipboard data may contain strictly private information, like passwords. So, a browser must note make it easy to retrieve that information, but should also make it impossible if the user wanted it.

Today, only IE6- places no limits to it. It is quite simple to retrieve the clipboard data with it, and no restrictions are imposed. A very insecure thing.

My idea is making things similar to popup blockers. Once a JavaScript application tries to access the clipboard, a Yes/No alert box is presented to the user, stating that the app wants to retrieve data from the clipboard. A nice &quot;Don&apos;t ask me again for www.example.com&quot; checkbox could also be available, which saves the user preference. Like popups, the user should have some way to reset it too.

IE7 has implemented a similar thing. It is quite buggy though. Also, it doesn&apos;t have the checkbox to save the preference for the domain, but it doesn&apos;t ask it again for the same page if the user says &quot;Yes&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62004</commentid>
    <comment_count>8</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-11-22 11:42:05 -0800</bug_when>
    <thetext>Dialog boxes are generally a very bad thing for user interaction.  Clearly Google worked around this somehow if Harrison closed this as &quot;works for me&quot; a year ago.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62068</commentid>
    <comment_count>9</comment_count>
    <who name="">webkit</who>
    <bug_when>2007-11-23 02:52:27 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; Dialog boxes are generally a very bad thing for user interaction.  Clearly
&gt; Google worked around this somehow if Harrison closed this as &quot;works for me&quot; a
&gt; year ago.

The current workaround used by Google is displaying an alert saying - &quot;Your browser does not allow access to your computer&apos;s clipboard&quot; - which is actually not a workaround to the problems explained in this ticket.

Maybe Harrison could clarify this WFM.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63739</commentid>
    <comment_count>10</comment_count>
    <who name="Luca Bruno">lethalman88</who>
    <bug_when>2007-12-09 01:31:57 -0800</bug_when>
    <thetext>Qt has a JavascriptCanAccessClipboard setting which would set DOMPasteAllowed (don&apos;t know if this is the correct setting).

I think such setting would be the best way for the user, just like any other setting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68759</commentid>
    <comment_count>11</comment_count>
    <who name="Justin Garcia">justin.garcia</who>
    <bug_when>2008-01-29 19:58:54 -0800</bug_when>
    <thetext>*** Bug 12243 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2168831</commentid>
    <comment_count>12</comment_count>
    <who name="Frances Cornwall">frances_c</who>
    <bug_when>2026-01-01 14:40:53 -0800</bug_when>
    <thetext>I can&apos;t reproduce this bug in Safari 26.2. Copied text gets pasted back into the document body. There are no toolbar icons. I selected copy and paste from the dropdown menu.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>