Last Comment Bug 88057 - "Select all" on Error Console
: "Select all" on Error Console
Product: Toolkit Graveyard
Classification: Graveyard
Component: Error Console (show other bugs)
: Trunk
: All All
P3 enhancement with 3 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: 315896 481255 (view as bug list)
Depends on:
Blocks: 67603 490886
  Show dependency treegraph
Reported: 2001-06-27 11:10 PDT by Lythande
Modified: 2016-06-29 11:02 PDT (History)
13 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

wip .1 (9.41 KB, patch)
2009-03-03 23:09 PST, Nochum Sossonko [:Natch]
no flags Details | Diff | Splinter Review
Patch v0.2 (16.48 KB, patch)
2011-10-26 12:40 PDT, Paul O'Shannessy [:zpao] (not reading much bugmail, email directly)
dolske: review+
Details | Diff | Splinter Review

Description User image Lythande 2001-06-27 11:10:07 PDT
You should be able to select the entire content of the javascript console for
copying rather than having to select and copy each error separately.  :-)
Comment 1 User image Robert Ginda 2001-06-27 14:42:06 PDT
jsdebugger != jsconsole, over to hewitt.
Comment 2 User image Doron Rosenberg (IBM) 2001-06-29 08:33:25 PDT
rfe, confirming
Comment 3 User image Lythande 2001-06-29 12:04:45 PDT
Oops, sorry.  Thanks for re-directing.  As an additional comment, any sort of
multiple-selecting would be good.  (Shift-click, Ctrl-click, etc)
Comment 4 User image Jesse Ruderman 2002-05-09 19:30:37 PDT
Multiple selection in the javascript console is bug 67603.
Comment 5 User image Rob Rodgers 2004-03-23 18:06:51 PST
Would it be possible to add some ability to let javascript access the console
messages from Javascript?  The issue here is that when users want to file bug
reports against a site, relying on them to copy and paste the relevant messages
is not possible.

For security it is probably necessary to store the source domain with the
messages (and filtering those not relevant to the current page).
Comment 6 User image Eyal Rozenberg 2005-11-10 10:41:14 PST
*** Bug 315896 has been marked as a duplicate of this bug. ***
Comment 7 User image Eyal Rozenberg 2005-11-10 10:42:16 PST
It seems this bug is more about 'copy all' than 'select all' (see dupe).
Comment 8 User image Dave Garrett 2009-03-03 13:54:52 PST
*** Bug 481255 has been marked as a duplicate of this bug. ***
Comment 9 User image Nochum Sossonko [:Natch] 2009-03-03 14:34:30 PST
Going to take a stab at this...
Comment 10 User image Nochum Sossonko [:Natch] 2009-03-03 23:09:46 PST
Created attachment 365388 [details] [diff] [review]
wip .1

Throwing this up, this is what I got to so far, still have a ways to go to get the string copying working and keyboard stuff (which fyi doesn't work).

More to come later this/next week.
Comment 11 User image Philip Chee 2009-03-04 02:39:53 PST
The Console² console binding inherits from richlistbox which inherits from listbox so we can just do:

function selectAllItems()


Perhaps instead of trying to reinvent the wheel why not explore making the console box inherit from richlistbox? Then you get all the multiselect and copy functionality for free.

     <command id="cmd_close" oncommand="closeWindow(true)"/>
+    <command id="select_all" oncommand="selectAll()"/>

For consistency you should use "cmd_select_all".

+      <menuitem label="&selectAll.label;" accesskey="&selectAll.accesskey;"
+                id="menu_select_all" command="select_all"/>

Both Firefox and SeaMonkey use "menu_selectAll". In addition for the context menu item the Suite uses "menu_selectAll_cm". The latter fits in with the existing context menu item in the Error Console:

  "menu_copy_cm" command="cmd_copy"
Comment 12 User image Nochum Sossonko [:Natch] 2009-03-07 23:56:24 PST
Thanks for the reference and tips, I'll be including those in the next patch!
Comment 13 User image Nochum Sossonko [:Natch] 2009-04-21 00:50:32 PDT
I'm making some good progress on revamping the error console entirely, I'll attach a wip patch hopefully this week. Part of the refresh will include this bug, among others.
Comment 14 User image Nochum Sossonko [:Natch] 2009-12-23 12:42:48 PST
Pushing out old bugs that I won't have time to actually get to. Feel free to use/extend any patches attached...
Comment 15 User image Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2011-10-26 12:40:54 PDT
Created attachment 569758 [details] [diff] [review]
Patch v0.2

I took Nochum's patch and reworked it a fair amount. I took out the keypress stuff he had since I don't think it was working anyway (I may have just broken it in the process of changing). Honestly I don't think we should have that anyway. Multiselect is inconsistent enough.
Comment 16 User image Philip Chee 2011-10-26 21:35:53 PDT
Comment on attachment 569758 [details] [diff] [review]
Patch v0.2

> -        <xul:vbox class="console-rows" role="console-rows" xbl:inherits="dir=sortOrder"/>
> +        <xul:vbox anonid="console-rows-vbox" class="console-rows" role="console-rows" xbl:inherits="dir=sortOrder"/>

I think this change to the anonid is unnecessary.
Comment 17 User image Justin Dolske [:Dolske] 2011-11-09 18:40:57 PST
Comment on attachment 569758 [details] [diff] [review]
Patch v0.2

Review of attachment 569758 [details] [diff] [review]:

I didn't look too closely at this, but still a few comments. R+ assuming you have/will ponder them and fix if worthy.

::: toolkit/components/console/content/console.xul
@@ +91,5 @@
>                  oncommand="changeSortOrder('reverse');"/>
>        <menuseparator/>
>        <menuitem id="menu_copy_cm" command="cmd_copy"
>                  label="&copyCmd.label;" accesskey="&copyCmd.accesskey;"/>
> +      <menuseparator/>

I probably wouldn't bother with the extra menusep here, since it's a short menu.

::: toolkit/components/console/content/consoleBindings.xml
@@ +232,5 @@
> +              // First we need to sort selectedItems since selectedItems[0] is
> +              // always the first selected, but not necessarily the first in the list.
> +              // Then we'll separate each item with 2 newlines, otherwise it will be
> +              // hard to distinguish messages.
> +              function sortFn(a, b) a.getBoundingClientRect().top - b.getBoundingClientRect().top;

That's a little weird. No better way to get their index? Or add an index property instead?

Or drop selectedItems, and construct it on-demand by filtering all items for the ones selected?

@@ +310,5 @@
> +          // We're going to be lazy here and just push the new node in. We use
> +          // selectedItem[0] to determine the first selected (for shift click)
> +          // so we need to maintain that.
> +          var selectedItems = this.selectedItems.slice();
> +          selectedItems.push(aNode);

What happens when you select items, but further console spam causes them to scroll out of the console?

Also, presumably selectedItems gets nuked when closing the console?
Comment 18 User image Colby Russell :crussell (no longer Mozilla-ing) 2013-04-19 13:44:40 PDT
What happened here?  It looks like this patch fell through the cracks, despite the r+.
Comment 19 User image Wayne Mery (:wsmwk, NI for questions) 2013-06-18 06:47:55 PDT
(In reply to Colby Russell :crussell from comment #18)
> What happened here?  It looks like this patch fell through the cracks,
> despite the r+.

(probably) short answer is zpao no longer works on mozilla. 

Plus, web console (ctrl+shift+K in nightlies) is just around the corner. Making this request near obsolete
Comment 20 User image :Gavin Sharp [email:] 2013-06-18 08:16:13 PDT
Yeah, I think this is probably WONTFIX, but maybe someone else is interested in working on it.
Comment 21 User image :Gavin Sharp [email:] 2013-06-18 08:20:56 PDT
Sorry, didn't mean to resolve this.
Comment 22 User image sworddragon2 2013-09-26 06:39:51 PDT
Selecting all entries is now possible with the new console.
Comment 23 User image David E. Ross 2013-12-21 10:38:56 PST
Re comment #22:  Starting with which version?
Comment 24 User image sworddragon2 2013-12-21 12:40:48 PST
It should be the version with the new browser console. In this console you can now select all of the text.
Comment 25 User image Philip Chee 2013-12-22 05:54:04 PST
(In reply to sworddragon2 from comment #24)
> It should be the version with the new browser console. In this console you
> can now select all of the text.

This bug is about the Toolkit Error Console. The Firefox browser console is not available in anything that isn't called "Firefox".
Comment 26 User image sworddragon2 2013-12-22 06:03:23 PST
Possibly I have found this bug some time ago while searching for duplicates. At least this issue is fixed on Firefox so I haven't to create now another ticket.
Comment 27 User image (Unavailable until Apr 3) [:bgrins] 2016-06-27 07:46:45 PDT
The Error Console has been removed in favor of the Browser Console (see Bug 1278368), and the component is going to be removed.  If this bug is also relevant in the Browser Console, please reopen and move this into Firefox -> Developer Tools: Console.
Comment 28 User image Zack Weinberg (:zwol) 2016-06-27 09:42:08 PDT
I am mass-reopening and re-componenting every single one of the Toolkit:Error Console bugs that appear to have been closed without anyone even *glancing* at whether they were relevant to the Browser Console.

If you want to close a whole bunch of old bugs -- FOR ANY REASON -- it is YOUR RESPONSIBILITY to check EVERY SINGLE ONE OF THEM and make sure they are no longer valid.  Do not push that work onto the bug reporters.

(It's okay to close bugs that haven't been touched in years when they don't have enough information for you to figure out whether the problem is still relevant to the current software - the reporter probably isn't coming back to clarify.  But that is the ONLY situation where it is okay.)

(I'm going to have to do this in two steps because of the way the "change several bugs at once" form works.  Apologies for the extra bugspam.)
Comment 29 User image Philipp Kewisch [:Fallen] 2016-06-27 12:41:55 PDT
This WFM in the new browser console.

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