Last Comment Bug 694767 - Scratchpad paste via menu not working
: Scratchpad paste via menu not working
Status: RESOLVED FIXED
[sourceeditor][orion][scratchpad]
:
Product: Firefox
Classification: Client Software
Component: Developer Tools (show other bugs)
: Trunk
: All All
: P1 normal (vote)
: Firefox 10
Assigned To: Nobody; OK to take it and work on it
:
: J. Ryan Stinnett [:jryans] (use ni?)
Mentors:
Depends on: 697407
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-15 08:46 PDT by Bruce A. Wittmeier
Modified: 2011-11-02 10:29 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Bruce A. Wittmeier 2011-10-15 08:46:53 PDT
User Agent: Mozilla/5.0 (Windows NT 6.0; rv:10.0a1) Gecko/20111015 Firefox/10.0a1
Build ID: 20111015031037

Steps to reproduce:

Start browser
Open web dev/scratchpad
paste code
click comments



Actual results:

code disappears


Expected results:

code should get line numbers
code should execute
Comment 1 Bruce A. Wittmeier 2011-10-15 08:47:11 PDT
There is still a problem with the scratchpad editor in Tools/Web Developer/scratchpad

Browser:
Built from http://hg.mozilla.org/mozilla-central/rev/6d5fd5a30c71

O/S:
Windows Vista SP2

Previous bug (Resolved fixed):
https://bugzilla.mozilla.org/show_bug.cgi?id=684862

Instructions come from this post:
http://forums.mozillazine.org/viewtopic.php?f=38&t=2330201


STR:

Code to try:
===
    // open bookmarks.html in the current tab
    var as = content.document.getElementsByTagName("a");
    var out = [];
    for (var i = 0; i < as.length; i++) {
      out.push('<li><a href="' + as[i].href + '">' + as[i].innerHTML + "</a></li>");
    }
    var ch = Components.classes["@mozilla.org/widget/clipboardhelper;1"].
      getService(Components.interfaces.nsIClipboardHelper);
    ch.copyString(out.join("\r\n"));
===

Open the browser
1. open about:config
2. set devtools.chrome.enabled to true
3. tools > web developer > scratchpad
4. environment > browser
5. edit > paste
At this step:
 - I observe there are no line numbers added.
 - If you click the mouse in the comments, code disappears
6. execute > run
Code does not execute
Comment 2 Bobby Johnson [:rjohnson19] 2011-10-15 09:12:47 PDT
The difference from the STR in bug 684862 is the use of the Edit -> Paste menu item, rather than Ctrl/Cmd+V.

Paste in the right-click context menu shows the same issue.

Confirming on
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111015 Firefox/10.0a1
Comment 3 Bruce A. Wittmeier 2011-10-15 18:37:18 PDT
Just discovered that if you use the menu to paste into scratchpad, it fails.

If you use Ctrl-V it works as expected.
Comment 4 Mihai Sucan [:msucan] 2011-10-17 05:28:32 PDT
Thanks for your bug report. Confirmed. The Paste menu item is still not fixed (which is surprising), even if bug 692807 landed and fixed many copy/paste problems. We will look into fixing this case ASAP.
Comment 5 Mihai Sucan [:msucan] 2011-10-17 14:17:34 PDT
Reported bug upstream:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=361180
Comment 6 Mihai Sucan [:msucan] 2011-11-01 05:50:47 PDT
This is now fixed by bug 697407, as well as upstream. QA will verify.

Bruce and Bobby: please retest. Thank you very much for your reports and testing!
Comment 7 Alex Lakatos[:AlexLakatos] 2011-11-02 10:29:04 PDT
VERIFIED on Build identifier: Mozilla/5.0 (X11; Linux i686; rv:10.0a1) Gecko/20111102 Firefox/10.0a1 using steps similar to comment 1.

Logged bug 699130 while verifying this one. May be related?

Note You need to log in before you can comment on or make changes to this bug.