Scratchpad paste via menu not working

RESOLVED FIXED in Firefox 10

Status

()

Firefox
Developer Tools
P1
normal
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Bruce A. Wittmeier, Unassigned)

Tracking

Trunk
Firefox 10
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [sourceeditor][orion][scratchpad])

(Reporter)

Description

6 years ago
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
(Reporter)

Comment 1

6 years ago
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
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
Status: UNCONFIRMED → NEW
Component: General → Developer Tools
Ever confirmed: true
QA Contact: general → developer.tools
Summary: Web dev/Scratchpad not working → Scratchpad paste via menu not working
(Reporter)

Comment 3

6 years ago
Just discovered that if you use the menu to paste into scratchpad, it fails.

If you use Ctrl-V it works as expected.
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.
OS: Windows Vista → All
Hardware: x86 → All
Whiteboard: [sourceeditor][orion][scratchpad]
Version: 10 Branch → Trunk
Reported bug upstream:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=361180

Updated

6 years ago
Depends on: 697407

Updated

6 years ago
Priority: -- → P1
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!
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 10
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?
You need to log in before you can comment on or make changes to this bug.