Bug 10468 - [Drosera] The Console toolbar button should bring the console window to the front
: [Drosera] The Console toolbar button should bring the console window to the f...
: WebKit
New Bugs
: 420+
: Macintosh Mac OS X 10.4
: P2 Normal
Assigned To:
  Show dependency treegraph
Reported: 2006-08-17 13:14 PST by
Modified: 2008-05-17 09:55 PST (History)

attempted patch (24.58 KB, patch)
2006-10-28 16:52 PST, Matt Lilek (pewtermoose)
timothy: review-
Review Patch | Details | Formatted Diff | Diff
revised patch (24.78 KB, patch)
2006-10-29 19:08 PST, Matt Lilek (pewtermoose)
timothy: review+
Review Patch | Details | Formatted Diff | Diff


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

Description From 2006-08-17 13:14:07 PST
If your debugging via console to print out non-local variable and you allow that window to slip into the background clicking on the Console Icon in Drosera should bring that window to the foreground and in focus for events. 

As is, it does nothing and can be confusing if you have lots of windows obsuring it and if you keep clicking the Console Icon expecting the window to come to the front. You'll be waiting a while.
------- Comment #1 From 2006-08-17 13:22:05 PST -------
I think there should also be a menu command that does the same thing the toolbar button does.
------- Comment #2 From 2006-10-28 16:52:09 PST -------
Created an attachment (id=11270) [details]
attempted patch

Fixes focus bug and makes command + L activate the console as well.
------- Comment #3 From 2006-10-29 17:15:00 PST -------
(From update of attachment 11270 [details])
Actually i think this should be: if (consoleWindow.blur)

if (!consoleWindow.focus())

Dosent make sense.
------- Comment #4 From 2006-10-29 17:17:31 PST -------
(From update of attachment 11270 [details])
Actually this should just be an else case. No harm in calling focus() if the console is already focused.

    if (!consoleWindow)
         consoleWindow = window.open("console.html", "console", "top=200, left=200, width=500, height=300, toolbar=yes, resizable=yes");
+    else
+        consoleWindow.focus();
------- Comment #5 From 2006-10-29 17:19:59 PST -------
No need for the {} braces on the if and else, since they are one line statments.
------- Comment #6 From 2006-10-29 17:21:17 PST -------
My if (consoleWindow.blur) comment was wrong also. THere is no property on the window bject to test if it already has focus. The original patch was just always focusing the window (twice!).
------- Comment #7 From 2006-10-29 19:08:12 PST -------
Created an attachment (id=11280) [details]
revised patch
------- Comment #8 From 2006-10-30 08:35:07 PST -------
Landed in r17436.
------- Comment #9 From 2008-05-17 09:55:57 PST -------
Closing since Drosera has been replaced by the new Web Inspector debugger. Moving to the New Bugs component so the Drosera component can be closed and removed.